3b6935f30e
Closes #40981. Bug: https://github.com/dart-lang/sdk/issues/40981 Change-Id: I95715ab973a6f09bf7f8b4e090e5a80663cd4861 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139463 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
20 lines
601 B
Plaintext
20 lines
601 B
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue39659.dart:8:9: Error: Can't throw a value of 'String?' since it is neither dynamic nor non-nullable.
|
|
// throw bar();
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
static method foo() → dynamic {
|
|
invalid-expression "pkg/front_end/testcases/nnbd/issue39659.dart:8:9: Error: Can't throw a value of 'String?' since it is neither dynamic nor non-nullable.
|
|
throw bar();
|
|
^";
|
|
}
|
|
static method bar() → core::String?
|
|
return "asdf";
|
|
static method main() → dynamic {}
|