Files
sdk/pkg/front_end/testcases/nnbd_mixed/issue41496.dart.weak.expect
T
Johnni Winther 00353040b9 [CFE] Error when strong mode mixed with non-opted-in
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>
2020-05-14 17:10:51 +00:00

34 lines
943 B
Plaintext

library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd_mixed/issue41496.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/issue41496.dart:10:20: Error: Field 'f2' should be initialized because its type 'void Function()' doesn't allow null.
// static LegacyFoo f2;
// ^^
//
import self as self;
import "dart:core" as core;
import "org-dartlang-testcase:///issue41496_lib.dart";
class C extends core::Object {
static field () → void f2 = null;
synthetic constructor •() → self::C
: super core::Object::•()
;
}
static field () → void f1;
static method main() → dynamic {
new self::C::•();
}
library opted_out_lib;
import self as self2;
typedef LegacyFoo = () →* void;
static method test(() →* void f) → dynamic {}