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:
Paul Berry 2019-11-13 23:10:15 +00:00 committed by commit-bot@chromium.org
parent 5767cc1bfd
commit 22b2a35b9f

View file

@ -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 {