blob: e916e0ca4085908e0541188fd9373dd5c2c736d0 [file] [log] [blame]
library #lib /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
class T1 extends core::Object {
synthetic constructor •() self::T1
: super core::Object::•()
;
}
abstract class A extends core::Object {
synthetic constructor •() self::A
: super core::Object::•()
;
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] abstract method foo() dynamic;
}
class B extends self::A {
synthetic constructor •() self::B
: super self::A::•()
;
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2] method foo() dynamic
return new self::T1::•();
}
class Intermediate extends core::Object {
synthetic constructor •() self::Intermediate
: super core::Object::•()
;
[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4] method bar([@vm.inferred-type.metadata=#lib::B?] self::A aa) dynamic
return [@vm.direct-call.metadata=#lib::B.foo??] [@vm.inferred-type.metadata=#lib::T1 (skip check)] aa.{self::A::foo}(){() dynamic};
}
[@vm.inferred-type.metadata=!]late static field core::Function unknown;
static method use1([@vm.inferred-type.metadata=#lib::Intermediate] self::Intermediate i, [@vm.inferred-type.metadata=#lib::B?] self::A aa) dynamic
return [@vm.direct-call.metadata=#lib::Intermediate.bar] [@vm.inferred-type.metadata=#lib::T1 (skip check)] i.{self::Intermediate::bar}(aa){(self::A) dynamic};
static method use2([@vm.inferred-type.metadata=#lib::Intermediate] self::Intermediate i, [@vm.inferred-type.metadata=#lib::B?] self::A aa) dynamic
return [@vm.direct-call.metadata=#lib::Intermediate.bar] [@vm.inferred-type.metadata=#lib::T1 (skip check)] i.{self::Intermediate::bar}(aa){(self::A) dynamic};
static method getDynamic() dynamic
return self::unknown();
static method allocateB() dynamic {
new self::B::•();
}
static method main(core::List<core::String> args) dynamic {
self::use1(new self::Intermediate::•(), self::getDynamic() as{TypeError,ForDynamic,ForNonNullableByDefault} self::A);
self::allocateB();
self::use2(new self::Intermediate::•(), self::getDynamic() as{TypeError,ForDynamic,ForNonNullableByDefault} self::A);
}