mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
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:
parent
08ff740d4d
commit
bfe3a31cd4
1 changed files with 20 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
''');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue