Sam Rawlins
8900608365
Report fewer duplicate errors for invalid superinitializers
...
Fixes https://github.com/dart-lang/sdk/issues/45958
Move check out of old checker.dart, into (less old) error_verifier.dart
and move test case out of old checker_test.dart. Add valid test case.
Rename INVALID_SUPER_INVOCATION to SUPER_INVOCATION_NOT_LAST, and
correct comment on that code (it has a parameter).
Do not duplicate report that code with MULTIPLE_SUPER_INVOCATIONS or
with SUPER_IN_REDIRECTING_CONSTRUCTOR.
Change-Id: I26e28b345fd8cef8ed2c9ec89ab12b56ea1c2f37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218982
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2021-11-08 18:53:42 +00:00
Johnni Winther
b3af778a38
[cfe] Add UnresolvedKind for fine grained unresolved reporting
...
- including tests for issues 46719 and 46887
Change-Id: I601fcfcb956e059f502cbece29fb2a6a00f68846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210464
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-08-25 09:51:54 +00:00
Konstantin Shcheglov
920d1d85e1
Stop reporting StrongModeCode.TOP_LEVEL_INSTANCE_GETTER
...
Initial: https://dart-review.googlesource.com/c/sdk/+/195302
Reverted: https://dart-review.googlesource.com/c/sdk/+/196282
Internal presubmit looks green.
https://test.corp.google.com/ui#id=OCL:372759773:BASE:372759779:1620532577947:b5e08140
Change-Id: I7348692e1f34f26a9aca48902abb16df50fda2c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-05-09 18:51:18 +00:00
Leaf Petersen
b101a7d002
Add language versions to _2 test libraries
...
Change-Id: Ib33169c3e0ffc870915c189404074a1dea472546
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196548
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Leaf Petersen <leafp@google.com >
2021-04-26 17:58:57 +00:00
David Morgan
d8479de94b
Revert "Stop reporting StrongModeCode.TOP_LEVEL_INSTANCE_GETTER"
...
This reverts commit 649f7cf689 .
Reason for revert: Breaks google3: b/185875256
Original change's description:
> Stop reporting StrongModeCode.TOP_LEVEL_INSTANCE_GETTER
>
> Change-Id: I947e1edb042825a5cfc3394d2554ad3272f86b91
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195302
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ic019fa570f048e213290ac04d02d1b4655415b47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196282
Reviewed-by: David Morgan <davidmorgan@google.com >
Commit-Queue: David Morgan <davidmorgan@google.com >
2021-04-21 10:22:18 +00:00
Konstantin Shcheglov
649f7cf689
Stop reporting StrongModeCode.TOP_LEVEL_INSTANCE_GETTER
...
Change-Id: I947e1edb042825a5cfc3394d2554ad3272f86b91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2021-04-20 04:53:39 +00:00
Sam Rawlins
f1916cf0bb
Analyzer: do not report an undefined getter with an empty name
...
Such code is already reported with parser errors, like missing_identifier.
Change-Id: I7f4cc049aa6129cea84d210ccb4e595e52d96fb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173740
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-05 14:39:03 +00:00
Brian Wilkerson
3fe3a0384f
Improve the highlight range for invalid_super_invocation
...
Change-Id: I8be664802f04def78304b7cc0e8481d734d295e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170040
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-11-01 15:24:51 +00:00
Jens Johansen
0c90775fd6
[CFE] Better error messages for class initialization errors
...
Change-Id: Ic7c489b0bfffd05cdd71dc254db042956fd25c3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161944
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-09-09 11:37:47 +00:00
Konstantin Shcheglov
8de8a1c226
Move codes from StaticTypeWarningCode into CompileTimeErrorCode.
...
They are all errors now.
Change-Id: If48d38e38e845fd5b5a950dd5514bf1cbbce03d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-27 16:44:15 +00:00
Dmitry Stefantsov
c07d5d84b8
[cfe] Allow uninitialized non-nullable late fields
...
Change-Id: If0d1450c317b488e3299cfa031ab1a3d6953a7ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137787
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-03-03 09:50:27 +00:00
Konstantin Shcheglov
c7b501625e
Validate not only errors, but also warnings.
...
Change-Id: I2c03711061ccd40d1609cf9148f3169b4df847d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135600
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-02-13 21:31:59 +00:00
Robert Nystrom
fc1b1ecc71
Move files under language_2 into subdirectories.
...
Change-Id: Idbcc965a27e9ffeedf5e0a1068b019de4193070f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127745
Commit-Queue: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Alexander Thomas <athom@google.com >
2019-12-11 19:18:00 +00:00