blob: 56c3e97bb4d542d443e6e1b23646aa8c7020eb38 [file] [log] [blame]
library /*isNonNullableByDefault*/;
import self as self;
import "dart:test" as test;
import "dart:test";
static method main() dynamic {
test::Class1? c1;
test::Class2? c2;
}
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/platform_nonnullable_fields/patch_lib.dart:10:7: Warning: Field 'field' isn't initialized and its type 'int' doesn't allow null.
// int field;
// ^^^^^
//
// pkg/front_end/testcases/nnbd/platform_nonnullable_fields/patch_lib.dart:15:7: Warning: This constructor doesn't initialize field 'field' and its type 'int' doesn't allow null.
// int field;
// ^^^^^
//
import self as test;
import "dart:_internal" as _in;
import "dart:core" as core;
import "dart:_internal";
@#C1
class Class1 extends core::Object {
field core::int field = null /* from org-dartlang-testcase:///patch_lib.dart */;
synthetic constructor •() test::Class1
: super core::Object::•()
;
}
@#C1
class Class2 extends core::Object {
field core::int field /* from org-dartlang-testcase:///patch_lib.dart */;
constructor constructor2(core::int field) test::Class2
: test::Class2::field = field, super core::Object::•()
;
constructor constructor1() test::Class2
: test::Class2::field = null, super core::Object::•()
;
}
constants {
#C1 = _in::_Patch {}
}