blob: 9ca1d8bd42cc6eda426573c7f50a748c73764db3 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
abstract class C extends core::Object {
synthetic constructor •() self::C
: super core::Object::•()
;
abstract get _f1() core::int?;
abstract get _f2() core::int?;
abstract set _f2(synthesized core::int? #externalFieldValue) → void;
}
class D extends core::Object {
final field core::int? _f1;
final field core::int? _f2;
constructor •(core::int i) self::D
: self::D::_f1 = i, self::D::_f2 = i, super core::Object::•()
;
}
static method acceptsInt(core::int x) void {}
static method testAbstractFinalFieldIsPromotable(self::C c) void {
if(!(c.{self::C::_f1}{core::int?} == null)) {
core::int x = let core::int? #t1 = c.{self::C::_f1}{core::int?} in #t1 == null ?{core::int} #t1 as{Unchecked} core::int : #t1{core::int};
self::acceptsInt(x);
}
}
static method testAbstractNonFinalFieldIsNotPromotable(self::C c) void {
if(!(c.{self::C::_f2}{core::int?} == null)) {
core::int? x = c.{self::C::_f2}{core::int?};
x = null;
}
}
static method testAbstractFinalFieldDoesNotBlockPromotionElsewhere(self::D d) void {
if(!(d.{self::D::_f1}{core::int?} == null)) {
core::int x = let core::int? #t2 = d.{self::D::_f1}{core::int?} in #t2 == null ?{core::int} #t2 as{Unchecked} core::int : #t2{core::int};
self::acceptsInt(x);
}
}
static method testAbstractNonFinalFieldBlocksPromotionElsewhere(self::D d) void {
if(!(d.{self::D::_f2}{core::int?} == null)) {
core::int? x = d.{self::D::_f2}{core::int?};
x = null;
}
}
static method main() dynamic {}