Stephen Adams
cd2258572d
Test for avoiding exponential tree traversal of DAG constants
...
Change-Id: Ib62db28a7a6d21fe859f32f092e1096c0c166752
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109160
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2021-01-06 03:54:30 +00:00
Johnni Winther
38d7c7661d
[cfe] Special case Null in assignability errors.
...
In error reporting on assignability where the expression has type
`Null` we use a special messages that doesn't state that
"'Null' is nullable". Cases where `Null` is part of the type or where
the expression of type `Null` is derived from a collection are not
special cased.
Closes #43998
Closes #44093
Change-Id: Ic0c79e6362f2365eb3fe8222ccd2ef8fac4f188d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170433
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-11-09 11:07:44 +00:00
Johnni Winther
13704520a0
[cfe] Indicate nullability as assignability issue when appropriate
...
Closes #43592 .
Bug: https://github.com/dart-lang/sdk/issues/43592
Change-Id: Ib57a70526a39a7125238546f08e1a2e97c279f0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168860
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-29 16:10:03 +00:00
Johnni Winther
4948c31b7a
[test_runner] Support detection of CFE warnings
...
+ some test expectation fixes
Change-Id: Ibf0259914960ea25978f2b8e29aa89336e209f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162321
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-15 07:57:31 +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
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
Sam Rawlins
f23f450e11
Analyzer: Move CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH to compile-time
...
Many of the tests were highly redundant. Subtyping has been
consolidated, so the tests don't need to cover a dozen different ways
to subtype a class.
Change-Id: I04448790d3a74690d0edb57f15146a6c3b8f2173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156400
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-30 00:34:29 +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
Sam Rawlins
c65b444145
Analyzer: Move TOP_LEVEL_CYCLE to be a compile-time error
...
Also remove duplication with RECURSIVE_COMPILE_TIME_CONSTANT.
Also write some tests for TOP_LEVEL_CYCLE.
Change-Id: I33cb765236a83bd925f9f0c6e65ac9398761c699
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-24 15:11:38 +00:00
Johnni Winther
9ab7a5edef
[cfe] Use variable name in error message for missing initializer
...
Closes #42610
Change-Id: I70a5ac9302bd6545cd5e73f2dab61a29bc6a3000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153462
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-07-08 12:45:15 +00:00
Brian Wilkerson
d074bb1596
Improve the range selected by const_constructor_with_field_initialized_by_non_const
...
Instead of highlighting the entire constructor, which might be long, we
now highlight just the keyword `const`.
Change-Id: Ie520db0a2fcaf05db79d9e49e08f06a5212fef7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152727
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-06-28 14:51:31 +00:00
Konstantin Shcheglov
f91880f9e6
Update analyzer expectation for language/const/switch2_test
...
Change-Id: I787c81947f0396243ac97cdd694ae300639d33f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142442
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-04-04 00:12:32 +00:00
Konstantin Shcheglov
90574ee9fd
Add default values for optional parameters in const/constructor2_test
...
Change-Id: Ibf8066d7c4eb5c047a6423efb4529ac9fa620459
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142403
Reviewed-by: Bob Nystrom <rnystrom@google.com >
2020-04-03 21:44:06 +00:00
Robert Nystrom
e736495eb7
Migrate language_2/const to NNBD.
...
Change-Id: I464275799b3e7a21326d35503b776f9c1101a599
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141764
Commit-Queue: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Erik Ernst <eernst@google.com >
Auto-Submit: Bob Nystrom <rnystrom@google.com >
2020-04-03 00:56:36 +00:00