blob: b9f5060d98aca519bd30d6ab9a14f2d6f2ce58c8 [file] [log] [blame]
library #lib /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
import "dart:_internal" as _in;
abstract class A<T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() self::A<self::A::T%>
: super core::Object::•()
;
}
class B<T extends core::Object? = dynamic> extends self::A<self::B::T%> {
synthetic constructor •() self::B<self::B::T%>
: super self::A::•()
;
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] [@vm.unboxing-info.metadata=()->i] method testT1() dynamic
return _in::unsafeCast<self::B::T%>(#C1);
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4] method testT2negative() dynamic
return #C2 as{ForNonNullableByDefault} self::B::T%;
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6] method testT3() dynamic
return _in::unsafeCast<self::B::T%>(#C2);
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8] [@vm.unboxing-info.metadata=()->i] method testNullableT1() dynamic
return _in::unsafeCast<self::B::T?>(#C1);
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10] method testNullableT2() dynamic
return _in::unsafeCast<self::B::T?>(#C2);
}
[@vm.unboxing-info.metadata=()->i]static method testInt1() dynamic
return _in::unsafeCast<core::int>(#C1);
static method testInt2negative() dynamic
return #C2 as{ForNonNullableByDefault} core::int;
[@vm.unboxing-info.metadata=()->i]static method testNullableInt1() dynamic
return _in::unsafeCast<core::int?>(#C1);
static method testNullableInt2() dynamic
return _in::unsafeCast<core::int?>(#C2);
static method testDynamic() dynamic
return _in::unsafeCast<dynamic>(#C3);
static method testObjectNegative() dynamic
return let dynamic #t1 = #C2 in #t1 as{ForNonNullableByDefault} core::Object;
static method testNullableObject() dynamic
return #C2;
static method testAOfNum1([@vm.inferred-type.metadata=#lib::B<dart.core::int>] dynamic x) dynamic
return _in::unsafeCast<self::A<core::num>>(x);
static method testAOfNum2negative([@vm.inferred-type.metadata=#lib::B<dart.core::int?>] dynamic x) dynamic
return x as{ForNonNullableByDefault} self::A<core::num>;
static method testAOfNum3negative() dynamic
return #C2 as{ForNonNullableByDefault} self::A<core::num>;
static method testAOfNullableNum([@vm.inferred-type.metadata=#lib::B<dart.core::int?>] dynamic x) dynamic
return _in::unsafeCast<self::A<core::num?>>(x);
static method testNullableAOfNum() dynamic
return _in::unsafeCast<self::A<core::num>?>(#C2);
static method testNullableAOfNumNegative([@vm.inferred-type.metadata=#lib::B<dart.core::int?>] dynamic x) dynamic
return x as{ForNonNullableByDefault} self::A<core::num>?;
static method testNullableAOfNullableNum([@vm.inferred-type.metadata=#lib::B<dart.core::int?>] dynamic x) dynamic
return _in::unsafeCast<self::A<core::num?>?>(x);
static method main() void {
self::testInt1();
self::testInt2negative();
self::testNullableInt1();
self::testNullableInt2();
self::testDynamic();
self::testObjectNegative();
self::testNullableObject();
self::testAOfNum1(new self::B::•<core::int>());
self::testAOfNum2negative(new self::B::•<core::int?>());
self::testAOfNum3negative();
self::testAOfNullableNum(new self::B::•<core::int?>());
self::testNullableAOfNum();
self::testNullableAOfNumNegative(new self::B::•<core::int?>());
self::testNullableAOfNullableNum(new self::B::•<core::int?>());
[@vm.direct-call.metadata=#lib::B.testT1] [@vm.inferred-type.metadata=!? (skip check)] new self::B::•<core::int>().{self::B::testT1}(){(dynamic) dynamic};
[@vm.direct-call.metadata=#lib::B.testT2negative] [@vm.inferred-type.metadata=!? (skip check)] new self::B::•<core::int>().{self::B::testT2negative}(){(dynamic) dynamic};
[@vm.direct-call.metadata=#lib::B.testT3] [@vm.inferred-type.metadata=!? (skip check)] new self::B::•<core::int?>().{self::B::testT3}(){(dynamic) dynamic};
[@vm.direct-call.metadata=#lib::B.testNullableT1] [@vm.inferred-type.metadata=!? (skip check)] new self::B::•<core::int>().{self::B::testNullableT1}(){(dynamic) dynamic};
[@vm.direct-call.metadata=#lib::B.testNullableT2] [@vm.inferred-type.metadata=!? (skip check)] new self::B::•<core::int>().{self::B::testNullableT2}(){(dynamic) dynamic};
}
constants {
#C1 = 42
#C2 = null
#C3 = "hi"
}