00353040b9
Change-Id: Ibff34fe071a6d10ce29c30e1d008d4a5ce6690a0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140868 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Jens Johansen <jensj@google.com>
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
library opted_out_lib;
|
|
import self as self;
|
|
import "issue41496b_lib.dart" as iss;
|
|
|
|
import "org-dartlang-testcase:///issue41496b_lib.dart" as opt_in;
|
|
|
|
typedef LegacyFoo = () →* void;
|
|
static method test(() →* void f) → dynamic {}
|
|
static method main() → dynamic {
|
|
iss::main();
|
|
}
|
|
|
|
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd_mixed/issue41496b_lib.dart:7:11: Error: Field 'f1' should be initialized because its type 'void Function()' doesn't allow null.
|
|
// LegacyFoo f1;
|
|
// ^^
|
|
//
|
|
// pkg/front_end/testcases/nnbd_mixed/issue41496b_lib.dart:10:20: Error: Field 'f2' should be initialized because its type 'void Function()' doesn't allow null.
|
|
// static LegacyFoo f2;
|
|
// ^^
|
|
//
|
|
import self as iss;
|
|
import "dart:core" as core;
|
|
|
|
import "org-dartlang-testcase:///issue41496b.dart";
|
|
|
|
class C extends core::Object {
|
|
static field () → void f2 = null;
|
|
synthetic constructor •() → iss::C
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
static field () → void f1;
|
|
static method main() → dynamic {
|
|
new iss::C::•();
|
|
}
|