c191551fac
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>
33 lines
879 B
Plaintext
33 lines
879 B
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
|
|
// return;
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
static method test() → dynamic {
|
|
(dynamic x) → core::int? {
|
|
if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
|
|
return 1;
|
|
}
|
|
else {
|
|
return let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42459.dart:10:7: Error: A value must be explicitly returned from a non-void function.
|
|
return;
|
|
^" in null;
|
|
}
|
|
};
|
|
function local(dynamic x) → void {
|
|
if(x as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool) {
|
|
return core::print("");
|
|
}
|
|
else {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
static method main() → dynamic {}
|