mirror of
https://github.com/dart-lang/sdk
synced 2024-10-07 08:50:47 +00:00
Migration: add tests for some implicit coercion corner cases
Bug: https://github.com/dart-lang/sdk/issues/47848 Change-Id: I5d04be8f379e35b70b86437940dd9b04c26e8174 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222028 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
e07ff780e2
commit
bce700e369
|
@ -954,6 +954,25 @@ Map<int, String?> Function() f(C<String?> c) => c;
|
|||
});
|
||||
}
|
||||
|
||||
@FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/47848')
|
||||
Future<void> test_call_tearoff_futureOr() async {
|
||||
var content = '''
|
||||
import 'dart:async';
|
||||
class C {
|
||||
void call() {}
|
||||
}
|
||||
FutureOr<void Function()> f(C c) => c;
|
||||
''';
|
||||
var expected = '''
|
||||
import 'dart:async';
|
||||
class C {
|
||||
void call() {}
|
||||
}
|
||||
FutureOr<void Function()> f(C c) => c;
|
||||
''';
|
||||
await _checkSingleFileChanges(content, expected);
|
||||
}
|
||||
|
||||
Future<void> test_call_tearoff_inherited() async {
|
||||
var content = '''
|
||||
class B {
|
||||
|
@ -1006,6 +1025,23 @@ Map<int, String?> Function() f(C c) => c;
|
|||
await _checkSingleFileChanges(content, expected);
|
||||
}
|
||||
|
||||
@FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/47848')
|
||||
Future<void> test_call_tearoff_raw_function() async {
|
||||
var content = '''
|
||||
class C {
|
||||
void call() {}
|
||||
}
|
||||
Function f(C c) => c;
|
||||
''';
|
||||
var expected = '''
|
||||
class C {
|
||||
void call() {}
|
||||
}
|
||||
Function f(C c) => c;
|
||||
''';
|
||||
await _checkSingleFileChanges(content, expected);
|
||||
}
|
||||
|
||||
Future<void> test_catch_simple() async {
|
||||
var content = '''
|
||||
void f() {
|
||||
|
|
Loading…
Reference in a new issue