mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 15:17:07 +00:00
Add failing test for issue #39376
Change-Id: I3dc72f24824c13a54542602fdf4d10055bfec6f1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125122 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
parent
5767cc1bfd
commit
22b2a35b9f
1 changed files with 25 additions and 0 deletions
|
@ -1665,6 +1665,31 @@ int f(int x) {
|
|||
await _checkSingleFileChanges(content, expected);
|
||||
}
|
||||
|
||||
@FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/39376')
|
||||
test_infer_required() async {
|
||||
var content = '''
|
||||
void _f(bool b, {int x}) {
|
||||
if (b) {
|
||||
print(x + 1);
|
||||
}
|
||||
}
|
||||
main() {
|
||||
_f(true, x: 1);
|
||||
}
|
||||
''';
|
||||
var expected = '''
|
||||
void _f(bool b, {required int x}) {
|
||||
if (b) {
|
||||
print(x + 1);
|
||||
}
|
||||
}
|
||||
main() {
|
||||
_f(true, x: 1);
|
||||
}
|
||||
''';
|
||||
await _checkSingleFileChanges(content, expected);
|
||||
}
|
||||
|
||||
test_inferred_method_parameter_type_non_nullable() async {
|
||||
var content = '''
|
||||
class B {
|
||||
|
|
Loading…
Reference in a new issue