mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
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>
This commit is contained in:
parent
867d6537df
commit
c7b501625e
|
@ -1193,7 +1193,10 @@ mixin _StaticErrorOutput on CommandOutput {
|
|||
? error.isAnalyzer
|
||||
: error.isCfe);
|
||||
|
||||
var validation = StaticError.validateExpectations(expected, errors);
|
||||
var validation = StaticError.validateExpectations(
|
||||
expected,
|
||||
[...errors, ...warnings],
|
||||
);
|
||||
if (validation == null) return Expectation.pass;
|
||||
|
||||
writer?.subsection("static error failures");
|
||||
|
|
|
@ -10,6 +10,8 @@ class A {
|
|||
// ^
|
||||
// [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER
|
||||
// [cfe] Can't access 'this' in a field initializer to read 'x'.
|
||||
// ^
|
||||
// [analyzer] STATIC_WARNING.TOP_LEVEL_INSTANCE_GETTER
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
|
Loading…
Reference in a new issue