OLD | NEW |
(Empty) | |
| 1 library superclass_test; |
| 2 import self as self; |
| 3 import "dart:core" as core; |
| 4 import "../../runtime/reify/interceptors.dart" as int; |
| 5 import "../../runtime/reify/types.dart" as typ; |
| 6 import "./test_base.dart" as tes; |
| 7 import "../../runtime/reify/declarations.dart" as dec; |
| 8 |
| 9 class X extends core::Object implements int::HasRuntimeTypeGetter { |
| 10 constructor •() → void |
| 11 : super core::Object::•() |
| 12 ; |
| 13 get $type() → typ::ReifiedType |
| 14 return new typ::Interface::•(self::$declarations.[](0)); |
| 15 get $is$R() → core::bool |
| 16 return false; |
| 17 } |
| 18 class Y extends core::Object implements int::HasRuntimeTypeGetter { |
| 19 constructor •() → void |
| 20 : super core::Object::•() |
| 21 ; |
| 22 get $type() → typ::ReifiedType |
| 23 return new typ::Interface::•(self::$declarations.[](1)); |
| 24 get $is$R() → core::bool |
| 25 return false; |
| 26 } |
| 27 class R extends core::Object implements int::HasRuntimeTypeGetter { |
| 28 final field typ::ReifiedType $type; |
| 29 constructor •(typ::ReifiedType $type) → void |
| 30 : self::R::$type = $type, super core::Object::•() |
| 31 ; |
| 32 get $R$T() → typ::ReifiedType |
| 33 return typ::getTypeArguments(typ::asInstanceOf(this.$type, self::$declaratio
ns.[](2))).[](0); |
| 34 get $is$R() → core::bool |
| 35 return true; |
| 36 get runtimeType() → core::Type |
| 37 return this.{=self::R::$type}; |
| 38 } |
| 39 class A extends core::Object implements int::HasRuntimeTypeGetter { |
| 40 final field typ::ReifiedType $type; |
| 41 constructor •(typ::ReifiedType $type) → void |
| 42 : self::A::$type = $type, super core::Object::•() |
| 43 ; |
| 44 method foo() → dynamic { |
| 45 return new self::R::•(new typ::Interface::•(self::$declarations.[](2), typ::
getTypeArguments(typ::asInstanceOf(this.$type, self::$declarations.[](3))))); |
| 46 } |
| 47 get $A$T() → typ::ReifiedType |
| 48 return typ::getTypeArguments(typ::asInstanceOf(this.$type, self::$declaratio
ns.[](3))).[](0); |
| 49 get $is$R() → core::bool |
| 50 return false; |
| 51 get runtimeType() → core::Type |
| 52 return this.{=self::A::$type}; |
| 53 } |
| 54 class B extends self::A implements int::HasRuntimeTypeGetter { |
| 55 constructor •(typ::ReifiedType $type) → void |
| 56 : super self::A::•($type) |
| 57 ; |
| 58 get $B$T() → typ::ReifiedType |
| 59 return typ::getTypeArguments(typ::asInstanceOf(this.$type, self::$declaratio
ns.[](4))).[](0); |
| 60 get $is$R() → core::bool |
| 61 return false; |
| 62 } |
| 63 class C extends self::A implements int::HasRuntimeTypeGetter { |
| 64 constructor •(typ::ReifiedType $type) → void |
| 65 : super self::A::•($type) |
| 66 ; |
| 67 get $C$T() → typ::ReifiedType |
| 68 return typ::getTypeArguments(typ::asInstanceOf(this.$type, self::$declaratio
ns.[](5))).[](0); |
| 69 get $is$R() → core::bool |
| 70 return false; |
| 71 } |
| 72 class D extends self::B implements int::HasRuntimeTypeGetter { |
| 73 constructor •(typ::ReifiedType $type) → void |
| 74 : super self::B::•($type) |
| 75 ; |
| 76 get $D$T() → typ::ReifiedType |
| 77 return typ::getTypeArguments(typ::asInstanceOf(this.$type, self::$declaratio
ns.[](6))).[](0); |
| 78 get $is$R() → core::bool |
| 79 return false; |
| 80 } |
| 81 static final field core::List<dec::Class> $declarations = (core::List<dec::Class
> d) → core::List<dec::Class> { |
| 82 dec::init(d, 0, new typ::Interface::•(d.[](20))); |
| 83 dec::init(d, 1, new typ::Interface::•(d.[](20))); |
| 84 dec::init(d, 2, new typ::Interface::•(d.[](20))); |
| 85 dec::init(d, 3, new typ::Interface::•(d.[](20))); |
| 86 dec::init(d, 4, new typ::Interface::•(d.[](3), <dynamic>[d.[](4).variables.[](
0)])); |
| 87 dec::init(d, 5, new typ::Interface::•(d.[](3), <dynamic>[new typ::Interface::•
(d.[](1))])); |
| 88 dec::init(d, 6, new typ::Interface::•(d.[](4), <dynamic>[new typ::Interface::•
(d.[](2), <dynamic>[d.[](6).variables.[](0)])])); |
| 89 dec::init(d, 7, new typ::Interface::•(d.[](20))); |
| 90 dec::init(d, 8, new typ::Interface::•(d.[](20))); |
| 91 dec::init(d, 9, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface:
:•(d.[](22), <dynamic>[new typ::Interface::•(d.[](9))]), new typ::Interface::•(d
.[](23))]); |
| 92 dec::init(d, 10, new typ::Interface::•(d.[](24))); |
| 93 dec::init(d, 11, new typ::Interface::•(d.[](24))); |
| 94 dec::init(d, 12, new typ::Interface::•(d.[](20))); |
| 95 dec::init(d, 13, new typ::Interface::•(d.[](25))); |
| 96 dec::init(d, 14, new typ::Interface::•(d.[](25))); |
| 97 dec::init(d, 15, new typ::Interface::•(d.[](25))); |
| 98 dec::init(d, 16, new typ::Interface::•(d.[](25))); |
| 99 dec::init(d, 17, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface
::•(d.[](26))]); |
| 100 dec::init(d, 18, new typ::Interface::•(d.[](19))); |
| 101 dec::init(d, 19, new typ::Interface::•(d.[](25))); |
| 102 dec::init(d, 20, null); |
| 103 dec::init(d, 22, new typ::Interface::•(d.[](20))); |
| 104 dec::init(d, 23, new typ::Interface::•(d.[](20))); |
| 105 dec::init(d, 24, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface
::•(d.[](22), <dynamic>[new typ::Interface::•(d.[](24))])]); |
| 106 dec::init(d, 25, new typ::Interface::•(d.[](20))); |
| 107 dec::init(d, 26, new typ::Interface::•(d.[](20))); |
| 108 return d; |
| 109 }.call(dec::allocateDeclarations(<dynamic>["X", "Y", "R", "A", "B", "C", "D", "N
ull", "bool", "String", "int", "double", "Type", "AbstractClassInstantiationErro
r", "NoSuchMethodError", "CyclicInitializationError", "UnsupportedError", "Integ
erDivisionByZeroException", "RangeError", "ArgumentError", "Object", "HasRuntime
TypeGetter", "Comparable", "Pattern", "num", "Error", "Exception"], <dynamic>[0,
0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]))
; |
| 110 static method main() → dynamic { |
| 111 tes::expectTrue(let dynamic #t1 = new self::A::•(new typ::Interface::•(self::$
declarations.[](3), <dynamic>[new typ::Interface::•(self::$declarations.[](0))])
).foo() in #t1 is int::HasRuntimeTypeGetter && #t1.$is$R && (let dynamic #t2 = n
ew typ::Interface::•(self::$declarations.[](2), <dynamic>[new typ::Interface::•(
self::$declarations.[](0))]) in typ::isSubtypeOf(#t1.$type, #t2))); |
| 112 tes::expectTrue(let dynamic #t3 = new self::B::•(new typ::Interface::•(self::$
declarations.[](4), <dynamic>[new typ::Interface::•(self::$declarations.[](0))])
).foo() in #t3 is int::HasRuntimeTypeGetter && #t3.$is$R && (let dynamic #t4 = n
ew typ::Interface::•(self::$declarations.[](2), <dynamic>[new typ::Interface::•(
self::$declarations.[](0))]) in typ::isSubtypeOf(#t3.$type, #t4))); |
| 113 tes::expectTrue(let dynamic #t5 = new self::C::•(new typ::Interface::•(self::$
declarations.[](5), <dynamic>[new typ::Interface::•(self::$declarations.[](0))])
).foo() in #t5 is int::HasRuntimeTypeGetter && #t5.$is$R && (let dynamic #t6 = n
ew typ::Interface::•(self::$declarations.[](2), <dynamic>[new typ::Interface::•(
self::$declarations.[](1))]) in typ::isSubtypeOf(#t5.$type, #t6))); |
| 114 tes::expectTrue(let dynamic #t7 = new self::D::•(new typ::Interface::•(self::$
declarations.[](6), <dynamic>[new typ::Interface::•(self::$declarations.[](0))])
).foo() in #t7 is int::HasRuntimeTypeGetter && #t7.$is$R && (let dynamic #t8 = n
ew typ::Interface::•(self::$declarations.[](2), <dynamic>[new typ::Interface::•(
self::$declarations.[](2), <dynamic>[new typ::Interface::•(self::$declarations.[
](0))])]) in typ::isSubtypeOf(#t7.$type, #t8))); |
| 115 tes::expectTrue(!(let dynamic #t9 = new self::A::•(new typ::Interface::•(self:
:$declarations.[](3), <dynamic>[new typ::Interface::•(self::$declarations.[](0))
])).foo() in #t9 is int::HasRuntimeTypeGetter && #t9.$is$R && (let dynamic #t10
= new typ::Interface::•(self::$declarations.[](2), <dynamic>[new typ::Interface:
:•(self::$declarations.[](1))]) in typ::isSubtypeOf(#t9.$type, #t10)))); |
| 116 tes::expectTrue(!(let dynamic #t11 = new self::B::•(new typ::Interface::•(self
::$declarations.[](4), <dynamic>[new typ::Interface::•(self::$declarations.[](0)
)])).foo() in #t11 is int::HasRuntimeTypeGetter && #t11.$is$R && (let dynamic #t
12 = new typ::Interface::•(self::$declarations.[](2), <dynamic>[new typ::Interfa
ce::•(self::$declarations.[](1))]) in typ::isSubtypeOf(#t11.$type, #t12)))); |
| 117 tes::expectTrue(!(let dynamic #t13 = new self::C::•(new typ::Interface::•(self
::$declarations.[](5), <dynamic>[new typ::Interface::•(self::$declarations.[](0)
)])).foo() in #t13 is int::HasRuntimeTypeGetter && #t13.$is$R && (let dynamic #t
14 = new typ::Interface::•(self::$declarations.[](2), <dynamic>[new typ::Interfa
ce::•(self::$declarations.[](0))]) in typ::isSubtypeOf(#t13.$type, #t14)))); |
| 118 tes::expectTrue(!(let dynamic #t15 = new self::D::•(new typ::Interface::•(self
::$declarations.[](6), <dynamic>[new typ::Interface::•(self::$declarations.[](0)
)])).foo() in #t15 is int::HasRuntimeTypeGetter && #t15.$is$R && (let dynamic #t
16 = new typ::Interface::•(self::$declarations.[](2), <dynamic>[new typ::Interfa
ce::•(self::$declarations.[](2), <dynamic>[new typ::Interface::•(self::$declarat
ions.[](1))])]) in typ::isSubtypeOf(#t15.$type, #t16)))); |
| 119 } |
OLD | NEW |