Parker Lougheed
b8b67c066c
[cfe] Correct PrivateNamedParameter problem message
...
Named parameters can't start with underscores whether they are optional or required.
Change-Id: Iaaeab80f74a691b4981148f06412a60ca115f73e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337883
Auto-Submit: Parker Lougheed <parlough@gmail.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-12-01 17:32:48 +00:00
Robert Nystrom
cd5883fa85
Migrate "n" through "p" directory language tests off @compile-error.
...
The "@compile-error" comment is an old not-great way of defining static
error tests.
Change-Id: I6564643302f66c5920b38d2269c160099322560b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296421
Reviewed-by: Jake Macdonald <jakemac@google.com >
Commit-Queue: Jake Macdonald <jakemac@google.com >
Auto-Submit: Bob Nystrom <rnystrom@google.com >
2023-04-20 17:56:18 +00:00
Ahmed Ashour
0b5d908221
[analyzer] NOT_ENOUGH_POSITIONAL_ARGUMENTS
...
To report at the token of the expected positional argument
Fixes #50127
Change-Id: I5eb31c6d354fb15d482c2046f7faaa4505658f4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262603
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-10-11 17:56:11 +00:00
Ahmed Ashour
5fe480b788
Fix typos
...
Fix #49864
TEST=ci
Change-Id: I9a7e06d604cd0b4f56f2ac229ab3fc9f01cb9d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Lasse Nielsen <lrn@google.com >
Reviewed-by: Liam Appelbe <liama@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
2022-09-16 19:35:00 +00:00
Lasse R.H. Nielsen
5642199dd0
Remove uses of : as default value separator in some tests/ directories.
...
Change-Id: I35bb926e53e92fd02e264fb5b14feadf063fb8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257961
Reviewed-by: Michael Thomsen <mit@google.com >
Commit-Queue: Lasse Nielsen <lrn@google.com >
2022-09-07 14:49:17 +00:00
Danny Tuppeny
c818059287
[Analyzer] Report EXTRA_POSITIONAL_ARGUMENTS and EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED against first unmatched argument
...
Fixes #44598 .
Change-Id: I6bccf4f5448de024f27d0ed1ba51c730e22b6fe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178020
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-01-11 18:46:26 +00:00
Brian Wilkerson
7316f346e3
Update the highlighting for private_optional_parameter to include only the parameter name
...
Change-Id: Ie04c30d4d3db7aa9f6804097c8a5a0fd78854756
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175200
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-12-07 15:28:37 +00:00
Brian Wilkerson
cd897bc86c
Remove the diagnostic default_value_in_function_typed_parameter
...
This diagnostic is obsolete because the parser also produces a
diagnostic for this situation.
Change-Id: I5c5f7fc734ddeb5cfaaba9cc9980efe174aeb4e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164461
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-09-25 04:35:53 +00:00
Tess Strickland
3d77741666
[vm/compiler] Unify name checking in dynamic closure call dispatchers.
...
Instead of possibly looping over the closure function parameter names
array multiple times, just do it once. Check each entry against the
provided argument names. If none match, check the required bit (if in
null-safe mode). Also keep a count of matched names to check that all
provided names matched after the iteration.
Now that optional name checking is part of the fragment built by
BuildClosureCallArgumentsValidCheck, that method builds checks for
exactly the same things as its namesake in Function.
Also refactor the variables used by the checker into read/write ones
that need to be allocated in the parsed function and read-only ones
that can just be temporaries since no Phi nodes are needed.
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try
Bug: https://github.com/dart-lang/sdk/issues/40813
Change-Id: I3cb421dd538629d7f5499f3bbf0653d34b850dce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160725
Commit-Queue: Tess Strickland <sstrickl@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
Reviewed-by: Daco Harkes <dacoharkes@google.com >
2020-09-10 07:12:14 +00:00
Konstantin Shcheglov
ba92b78acd
Move errors from StaticWarningCode to CompileTimeErrorCode.
...
Bug: https://github.com/dart-lang/sdk/issues/42821
Change-Id: I153c48d7a2e4a02026928e6203aacf8f2dc029ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155849
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-26 04:19:25 +00:00
Robert Nystrom
5c1376615e
Migrate language_2/parameter to NNBD.
...
Change-Id: I369916a9edd3a9b38ab2c9ee1e11c4735331142b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150284
Auto-Submit: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2020-06-09 10:52:04 +00:00