blob: cf590d6d169a00dba09a814b2117b94cc8ec360f [file] [log] [blame]
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
import "dart:_internal" as _in;
class C extends core::Object {
field core::int? _#C#a = null;
field core::int? _#C#b = null;
field core::int? _#C#c = null;
field core::int? _#C#d = null;
synthetic constructor •() self::C
: super core::Object::•()
;
get a() core::int
return let final core::int? #t1 = this.{self::C::_#C#a} in #t1 == null ?{core::int} throw new _in::LateError::fieldNI("a") : #t1{core::int};
set a(core::int #t2) → void
this.{self::C::_#C#a} = #t2;
get b() core::int
return let final core::int? #t3 = this.{self::C::_#C#b} in #t3 == null ?{core::int} throw new _in::LateError::fieldNI("b") : #t3{core::int};
set b(core::int #t4) → void
if(this.{self::C::_#C#b} == null)
this.{self::C::_#C#b} = #t4;
else
throw new _in::LateError::fieldAI("b");
get c() core::int
return let final core::int? #t5 = this.{self::C::_#C#c} in #t5 == null ?{core::int} this.{self::C::_#C#c} = 1.{core::int::unary-}(){() → core::int} : #t5{core::int};
set c(core::int #t6) → void
this.{self::C::_#C#c} = #t6;
get d() core::int
return let final core::int? #t7 = this.{self::C::_#C#d} in #t7 == null ?{core::int} let final core::int #t8 = 1.{core::int::unary-}(){() → core::int} in this.{self::C::_#C#d} == null ?{core::int} this.{self::C::_#C#d} = #t8 : throw new _in::LateError::fieldADI("d") : #t7{core::int};
}
static field self::C c = new self::C::•();
static method main() void {
self::testUninitializedNonFinalInstanceField();
self::testUninitializedFinalInstanceField();
self::testInitializedNonFinalInstanceField();
self::testInitializedFinalInstanceField();
}
static method testUninitializedNonFinalInstanceField() void {
core::print(self::c.{self::C::a}{core::int});
self::c.{self::C::a} = 42;
core::print(self::c.{self::C::a}{core::int});
}
static method testUninitializedFinalInstanceField() void {
core::print(self::c.{self::C::b}{core::int});
self::c.{self::C::b} = 42;
core::print(self::c.{self::C::b}{core::int});
}
static method testInitializedNonFinalInstanceField() void {
core::print(self::c.{self::C::c}{core::int});
self::c.{self::C::c} = 42;
core::print(self::c.{self::C::c}{core::int});
}
static method testInitializedFinalInstanceField() void {
core::print(self::c.{self::C::d}{core::int});
}