Analyzer: Static warnings are reported as errors #36127
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Static warnings exist in Dart again, cf. issue #34349, and they should be reported as such and recognized in tests via the outcome expectation
static type warning
. However, using a fresh SDK checkout (commit fa0d991), the following program gives rise to test failures as shown below:Here is the output:
The subtest 3 (about default values) succeeds, reporting 'WARNING|STATIC_WARNING'.
All other subtests fail because the outcome is 'ERROR|STATIC_WARNING', which is not recognized by 'test.dart' as a static type warning. It is not obvious to me whether it's analyzer or 'test.dart' that needs to be adjusted in order to make these subtests succeed.
Note that it's being debated whether the invalid
return;
statements should be an error or a warning (dart-lang/language#255), which is significant for subtest 5 and 6.The text was updated successfully, but these errors were encountered: