mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:31:50 +00:00
Fix test_await_flattened in non_error_resolver_test.
This test was broken by 45b02f8216
,
which changed the behavior of flattening in the kernel driver.
Unfortuately the error wasn't picked up by the build bots because the
test is disabled - see #30796.
Change-Id: I93f488f066434afbeaaa6b82ceb9ac1278574861
Reviewed-on: https://dart-review.googlesource.com/34920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
6888aae228
commit
10042c74e3
|
@ -1070,11 +1070,14 @@ f(list) async* {
|
|||
}
|
||||
|
||||
test_await_flattened() async {
|
||||
// The analyzer type system over-flattens so it considers `await ffi()` to
|
||||
// have type `int` - see dartbug.com/31887
|
||||
var expectedType = enableKernelDriver ? 'Future<int>' : 'int';
|
||||
Source source = addSource('''
|
||||
import 'dart:async';
|
||||
Future<Future<int>> ffi() => null;
|
||||
f() async {
|
||||
int b = await ffi();
|
||||
$expectedType b = await ffi();
|
||||
}
|
||||
''');
|
||||
await computeAnalysisResult(source);
|
||||
|
|
Loading…
Reference in a new issue