Files
sdk/pkg/front_end/testcases/nnbd/issue43174.dart.weak.expect
T
Dmitry Stefantsov c191551fac [cfe] Remove BottomType
TEST=Covered by existing tests.

Change-Id: Ied8be1874164e68e0a3a48e1b2f9a33310071381
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183009
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-24 13:21:55 +00:00

31 lines
791 B
Plaintext

library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/issue43174.dart:17:12: Error: Can't return a value from a void function.
// return 42; // error
// ^
//
import self as self;
import "dart:core" as core;
import "dart:async";
static method method(() → void f) → dynamic {
f.call();
}
static method method2(() → FutureOr<void>f) → dynamic {
f.call();
}
static method test() → dynamic {
self::method(() → void {
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue43174.dart:17:12: Error: Can't return a value from a void function.
return 42; // error
^" in 42;
});
self::method2(() → core::int {
return 42;
});
}
static method main() → dynamic {}