blob: 020cdc3a6b66e29d41ede7e0bc3a232319954593 [file] [log] [blame]
library is1_test;
import self as self;
import "dart:core" as core;
import "../../runtime/reify/interceptors.dart" as int;
import "../../runtime/reify/types.dart" as typ;
import "./test_base.dart" as tes;
import "../../runtime/reify/declarations.dart" as dec;
class N extends core::Object implements int::HasRuntimeTypeGetter {
constructor •() void
: super core::Object::•()
;
get $type() typ::ReifiedType
return new typ::Interface::•(self::$declarations.[](0));
get $is$A() core::bool
return false;
}
class I extends self::N implements int::HasRuntimeTypeGetter {
constructor •() void
: super self::N::•()
;
get $type() typ::ReifiedType
return new typ::Interface::•(self::$declarations.[](1));
get $is$A() core::bool
return false;
}
class D extends self::N implements int::HasRuntimeTypeGetter {
constructor •() void
: super self::N::•()
;
get $type() typ::ReifiedType
return new typ::Interface::•(self::$declarations.[](2));
get $is$A() core::bool
return false;
}
class A extends core::Object implements int::HasRuntimeTypeGetter {
final field typ::ReifiedType $type;
constructor •(typ::ReifiedType $type) void
: self::A::$type = $type, super core::Object::•()
;
get $A$T() typ::ReifiedType
return typ::getTypeArguments(typ::asInstanceOf(this.$type, self::$declarations.[](3))).[](0);
get $is$A() core::bool
return true;
get runtimeType() core::Type
return this.{=self::A::$type};
}
static final field core::List<dec::Class> $declarations = (core::List<dec::Class> d) core::List<dec::Class> {
dec::init(d, 0, new typ::Interface::•(d.[](17)));
dec::init(d, 1, new typ::Interface::•(d.[](0)));
dec::init(d, 2, new typ::Interface::•(d.[](0)));
dec::init(d, 3, new typ::Interface::•(d.[](17)));
dec::init(d, 4, new typ::Interface::•(d.[](17)));
dec::init(d, 5, new typ::Interface::•(d.[](17)));
dec::init(d, 6, new typ::Interface::•(d.[](17)), <dynamic>[new typ::Interface::•(d.[](19), <dynamic>[new typ::Interface::•(d.[](6))]), new typ::Interface::•(d.[](20))]);
dec::init(d, 7, new typ::Interface::•(d.[](21)));
dec::init(d, 8, new typ::Interface::•(d.[](21)));
dec::init(d, 9, new typ::Interface::•(d.[](17)));
dec::init(d, 10, new typ::Interface::•(d.[](22)));
dec::init(d, 11, new typ::Interface::•(d.[](22)));
dec::init(d, 12, new typ::Interface::•(d.[](22)));
dec::init(d, 13, new typ::Interface::•(d.[](22)));
dec::init(d, 14, new typ::Interface::•(d.[](17)), <dynamic>[new typ::Interface::•(d.[](23))]);
dec::init(d, 15, new typ::Interface::•(d.[](16)));
dec::init(d, 16, new typ::Interface::•(d.[](22)));
dec::init(d, 17, null);
dec::init(d, 19, new typ::Interface::•(d.[](17)));
dec::init(d, 20, new typ::Interface::•(d.[](17)));
dec::init(d, 21, new typ::Interface::•(d.[](17)), <dynamic>[new typ::Interface::•(d.[](19), <dynamic>[new typ::Interface::•(d.[](21))])]);
dec::init(d, 22, new typ::Interface::•(d.[](17)));
dec::init(d, 23, new typ::Interface::•(d.[](17)));
return d;
}.call(dec::allocateDeclarations(<dynamic>["N", "I", "D", "A", "Null", "bool", "String", "int", "double", "Type", "AbstractClassInstantiationError", "NoSuchMethodError", "CyclicInitializationError", "UnsupportedError", "IntegerDivisionByZeroException", "RangeError", "ArgumentError", "Object", "HasRuntimeTypeGetter", "Comparable", "Pattern", "num", "Error", "Exception"], <dynamic>[0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]));
static method main() dynamic {
self::A x = new self::A::•(new typ::Interface::•(self::$declarations.[](3), <dynamic>[new typ::Interface::•(self::$declarations.[](1))]));
tes::expectTrue(let dynamic #t1 = x in #t1 is int::HasRuntimeTypeGetter && #t1.$is$A && (let dynamic #t2 = new typ::Interface::•(self::$declarations.[](3), <dynamic>[new typ::Interface::•(self::$declarations.[](0))]) in typ::isSubtypeOf(#t1.$type, #t2)));
tes::expectTrue(let dynamic #t3 = x in #t3 is int::HasRuntimeTypeGetter && #t3.$is$A && (let dynamic #t4 = new typ::Interface::•(self::$declarations.[](3), <dynamic>[new typ::Interface::•(self::$declarations.[](1))]) in typ::isSubtypeOf(#t3.$type, #t4)));
tes::expectFalse(let dynamic #t5 = x in #t5 is int::HasRuntimeTypeGetter && #t5.$is$A && (let dynamic #t6 = new typ::Interface::•(self::$declarations.[](3), <dynamic>[new typ::Interface::•(self::$declarations.[](2))]) in typ::isSubtypeOf(#t5.$type, #t6)));
self::A y = new self::A::•(new typ::Interface::•(self::$declarations.[](3), <dynamic>[const typ::Dynamic::•()]));
tes::expectTrue(let dynamic #t7 = y in #t7 is int::HasRuntimeTypeGetter && #t7.$is$A && (let dynamic #t8 = new typ::Interface::•(self::$declarations.[](3), <dynamic>[new typ::Interface::•(self::$declarations.[](0))]) in typ::isSubtypeOf(#t7.$type, #t8)));
tes::expectTrue(let dynamic #t9 = y in #t9 is int::HasRuntimeTypeGetter && #t9.$is$A && (let dynamic #t10 = new typ::Interface::•(self::$declarations.[](3), <dynamic>[new typ::Interface::•(self::$declarations.[](1))]) in typ::isSubtypeOf(#t9.$type, #t10)));
tes::expectTrue(let dynamic #t11 = y in #t11 is int::HasRuntimeTypeGetter && #t11.$is$A && (let dynamic #t12 = new typ::Interface::•(self::$declarations.[](3), <dynamic>[new typ::Interface::•(self::$declarations.[](2))]) in typ::isSubtypeOf(#t11.$type, #t12)));
}