blob: ac1c56bdf0359115c91f0fce05874211678e74a0 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart:8:5: Error: Field 'x' should be initialized because its type 'int' doesn't allow null.
// int x; // Error.
// ^
//
// pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart:13:14: Error: Field 'x' should be initialized because its type 'int' doesn't allow null.
// static int x; // Error.
// ^
//
// pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart:17:7: Error: Field 'lx' should be initialized because its type 'int' doesn't allow null.
// int lx; // Error.
// ^^
//
// pkg/front_end/testcases/nnbd/potentially_non_nullable_field.dart:23:5: Error: Field 'lt' should be initialized because its type 'T' doesn't allow null.
// T lt; // Error.
// ^^
//
import self as self;
import "dart:core" as core;
class A<T extends core::Object? = core::Object?> extends core::Object {
static field core::int x = null;
static field core::int? y = null;
late static field core::int z;
field core::int lx = null;
field core::int? ly = null;
late field core::int? lz;
field core::int lv;
field core::int lu;
generic-covariant-impl field self::A::T% lt = null;
generic-covariant-impl field self::A::T? ls = null;
late generic-covariant-impl field self::A::T% lr;
generic-covariant-impl field self::A::T% lp;
generic-covariant-impl field self::A::T% lq;
constructor •(core::int lv, self::A::T% lp, self::A::T% t) self::A<self::A::T%>
: self::A::lv = lv, self::A::lp = lp, self::A::lu = 42, self::A::lq = t, super core::Object::•()
;
}
static field core::int x;
static field core::int? y;
late static field core::int z;
static method main() dynamic {}