Add a failing test for issue 45030

Change-Id: I59e9db21ef97286c137e635b1c8bdbd2991b98a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185493
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Brian Wilkerson 2021-02-18 23:29:50 +00:00 committed by commit-bot@chromium.org
parent 08ff740d4d
commit bfe3a31cd4

View file

@ -98,6 +98,26 @@ main() {
vvv = 222;
}
}
''');
}
@FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/45030')
Future<void> test_variableDeclaration_nullSafe() async {
writeTestPackageConfig(languageVersion: '2.12.0');
await resolveTestCode('''
main() {
var a = true ? 111 : 222;
}
''');
await assertHasAssistAt('11 :', '''
main() {
late int a;
if (true) {
a = 111;
} else {
a = 222;
}
}
''');
}
}