Commit graph

8 commits

Author SHA1 Message Date
Kallen Tu
345d0f3a47 [analyzer] Issue 37238: Multiple errors for type mismatch assignments.
Avoid reporting an error if the static types are mismatched because
CompileTimeErrorCode.INVALID_ASSIGNMENT would have already been
reported by the ErrorVerifier.

Closes #37238

Bug: https://github.com/dart-lang/sdk/issues/37238
Change-Id: I2248d054ed6bf6a546e998afb9b731a36e197780
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304362
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-05-19 16:27:58 +00:00
Robert Nystrom
9bb4402abd Migrate "a" directory language tests off @compile-error.
The "@compile-error" comment is an old not-great way of defining static
error tests.

See: https://github.com/dart-lang/sdk/issues/45634
Change-Id: I35d4a7c7ad09cb77ff379af036180794d8b6afbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296403
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-04-20 20:50:39 +00:00
Sam Rawlins
b8ce4baf7e Remove 'checked mode' from checked_mode_compile_time_errors
Change-Id: I6576eb186149d540ce2dbc0e0aab7177ff4727be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156484
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-31 19:20:58 +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
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
Johnni Winther
9ea09ce17b [cfe] Improve message on final variable assignment
Closes #40242

Change-Id: Iccdfbf01da18ddd501dc705b678358c974003551
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140654
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-03-24 13:11:29 +00:00
Erik Ernst
3fb7f6a724 Adjusted language/assign/to_type_test.dart to avoid irrelevant
nnbd type error.

By the way, I don't understand why the trybots didn't complain about
this, all trybots were green when
https://dart-review.googlesource.com/c/sdk/+/134224 was auto-submitted.

Change-Id: Id410fc18e9ebf9be6c180740067857e2309f47ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134291
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
2020-02-04 22:04:40 +00:00
Robert Nystrom
3414b51675 Migrate language_2/assign to NNBD.
Change-Id: I71947bc5726f168fc036a7fece8a3b6b7bf964f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134224
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-04 10:37:43 +00:00