Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: pkg/kernel/testcases/reify/factories_test.dart.expect

Issue 2697873007: Merge the work on Generic Types Reification from 'dart-lang/reify' repo (Closed)
Patch Set: Get back parameter erroneously removed by previous commit Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 library factories_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 A extends core::Object implements int::HasRuntimeTypeGetter {
10 final field typ::ReifiedType $type;
11 constructor internal(typ::ReifiedType $type) → void
12 : self::A::$type = $type, super core::Object::•()
13 ;
14 static factory •(typ::ReifiedType $type) → self::A {
15 return new self::B::•(new typ::Interface::•(self::$declarations.[](1), <dyna mic>[typ::getTypeArguments(typ::asInstanceOf($type, self::$declarations.[](0))). [](0)]));
16 }
17 static factory named(typ::ReifiedType $type) → self::A {
18 return new self::A::internal(new typ::Interface::•(self::$declarations.[](0) , <dynamic>[typ::getTypeArguments(typ::asInstanceOf($type, self::$declarations.[ ](0))).[](0)]));
19 }
20 get $A$T() → typ::ReifiedType
21 return typ::getTypeArguments(typ::asInstanceOf(this.$type, self::$declaratio ns.[](0))).[](0);
22 get $is$A() → core::bool
23 return true;
24 get $is$B() → core::bool
25 return false;
26 get runtimeType() → core::Type
27 return this.{=self::A::$type};
28 }
29 class B extends self::A implements int::HasRuntimeTypeGetter {
30 constructor •(typ::ReifiedType $type) → void
31 : super self::A::internal($type)
32 ;
33 get $B$T() → typ::ReifiedType
34 return typ::getTypeArguments(typ::asInstanceOf(this.$type, self::$declaratio ns.[](1))).[](0);
35 get $is$A() → core::bool
36 return true;
37 get $is$B() → core::bool
38 return true;
39 }
40 class X extends core::Object implements int::HasRuntimeTypeGetter {
41 constructor •() → void
42 : super core::Object::•()
43 ;
44 get $type() → typ::ReifiedType
45 return new typ::Interface::•(self::$declarations.[](2));
46 get $is$A() → core::bool
47 return false;
48 get $is$B() → core::bool
49 return false;
50 }
51 class Y extends core::Object implements int::HasRuntimeTypeGetter {
52 constructor •() → void
53 : super core::Object::•()
54 ;
55 get $type() → typ::ReifiedType
56 return new typ::Interface::•(self::$declarations.[](3));
57 get $is$A() → core::bool
58 return false;
59 get $is$B() → core::bool
60 return false;
61 }
62 static final field core::List<dec::Class> $declarations = (core::List<dec::Class > d) → core::List<dec::Class> {
63 dec::init(d, 0, new typ::Interface::•(d.[](17)));
64 dec::init(d, 1, new typ::Interface::•(d.[](0), <dynamic>[d.[](1).variables.[]( 0)]));
65 dec::init(d, 2, new typ::Interface::•(d.[](17)));
66 dec::init(d, 3, new typ::Interface::•(d.[](17)));
67 dec::init(d, 4, new typ::Interface::•(d.[](17)));
68 dec::init(d, 5, new typ::Interface::•(d.[](17)));
69 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))]);
70 dec::init(d, 7, new typ::Interface::•(d.[](21)));
71 dec::init(d, 8, new typ::Interface::•(d.[](21)));
72 dec::init(d, 9, new typ::Interface::•(d.[](17)));
73 dec::init(d, 10, new typ::Interface::•(d.[](22)));
74 dec::init(d, 11, new typ::Interface::•(d.[](22)));
75 dec::init(d, 12, new typ::Interface::•(d.[](22)));
76 dec::init(d, 13, new typ::Interface::•(d.[](22)));
77 dec::init(d, 14, new typ::Interface::•(d.[](17)), <dynamic>[new typ::Interface ::•(d.[](23))]);
78 dec::init(d, 15, new typ::Interface::•(d.[](16)));
79 dec::init(d, 16, new typ::Interface::•(d.[](22)));
80 dec::init(d, 17, null);
81 dec::init(d, 19, new typ::Interface::•(d.[](17)));
82 dec::init(d, 20, new typ::Interface::•(d.[](17)));
83 dec::init(d, 21, new typ::Interface::•(d.[](17)), <dynamic>[new typ::Interface ::•(d.[](19), <dynamic>[new typ::Interface::•(d.[](21))])]);
84 dec::init(d, 22, new typ::Interface::•(d.[](17)));
85 dec::init(d, 23, new typ::Interface::•(d.[](17)));
86 return d;
87 }.call(dec::allocateDeclarations(<dynamic>["A", "B", "X", "Y", "Null", "bool", " String", "int", "double", "Type", "AbstractClassInstantiationError", "NoSuchMeth odError", "CyclicInitializationError", "UnsupportedError", "IntegerDivisionByZer oException", "RangeError", "ArgumentError", "Object", "HasRuntimeTypeGetter", "C omparable", "Pattern", "num", "Error", "Exception"], <dynamic>[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]));
88 static method main() → dynamic {
89 tes::expectTrue(let dynamic #t1 = self::A::named(new typ::Interface::•(self::$ declarations.[](0), <dynamic>[new typ::Interface::•(self::$declarations.[](2))]) ) in #t1 is int::HasRuntimeTypeGetter && #t1.$is$A && (let dynamic #t2 = new typ ::Interface::•(self::$declarations.[](0), <dynamic>[new typ::Interface::•(self:: $declarations.[](2))]) in typ::isSubtypeOf(#t1.$type, #t2)));
90 tes::expectTrue(!(let dynamic #t3 = self::A::named(new typ::Interface::•(self: :$declarations.[](0), <dynamic>[new typ::Interface::•(self::$declarations.[](2)) ])) in #t3 is int::HasRuntimeTypeGetter && #t3.$is$A && (let dynamic #t4 = new t yp::Interface::•(self::$declarations.[](0), <dynamic>[new typ::Interface::•(self ::$declarations.[](3))]) in typ::isSubtypeOf(#t3.$type, #t4))));
91 tes::expectTrue(let dynamic #t5 = new self::A::internal(new typ::Interface::•( self::$declarations.[](0), <dynamic>[new typ::Interface::•(self::$declarations.[ ](2))])) in #t5 is int::HasRuntimeTypeGetter && #t5.$is$A && (let dynamic #t6 = new typ::Interface::•(self::$declarations.[](0), <dynamic>[new typ::Interface::• (self::$declarations.[](2))]) in typ::isSubtypeOf(#t5.$type, #t6)));
92 tes::expectTrue(!(let dynamic #t7 = new self::A::internal(new typ::Interface:: •(self::$declarations.[](0), <dynamic>[new typ::Interface::•(self::$declarations .[](2))])) in #t7 is int::HasRuntimeTypeGetter && #t7.$is$A && (let dynamic #t8 = new typ::Interface::•(self::$declarations.[](0), <dynamic>[new typ::Interface: :•(self::$declarations.[](3))]) in typ::isSubtypeOf(#t7.$type, #t8))));
93 tes::expectTrue(let dynamic #t9 = self::A::•(new typ::Interface::•(self::$decl arations.[](0), <dynamic>[new typ::Interface::•(self::$declarations.[](2))])) in #t9 is int::HasRuntimeTypeGetter && #t9.$is$B && (let dynamic #t10 = new typ::I nterface::•(self::$declarations.[](1), <dynamic>[new typ::Interface::•(self::$de clarations.[](2))]) in typ::isSubtypeOf(#t9.$type, #t10)));
94 tes::expectTrue(!(let dynamic #t11 = self::A::•(new typ::Interface::•(self::$d eclarations.[](0), <dynamic>[new typ::Interface::•(self::$declarations.[](2))])) in #t11 is int::HasRuntimeTypeGetter && #t11.$is$B && (let dynamic #t12 = new t yp::Interface::•(self::$declarations.[](1), <dynamic>[new typ::Interface::•(self ::$declarations.[](3))]) in typ::isSubtypeOf(#t11.$type, #t12))));
95 tes::expectTrue(!(let dynamic #t13 = self::A::named(new typ::Interface::•(self ::$declarations.[](0), <dynamic>[new typ::Interface::•(self::$declarations.[](2) )])) in #t13 is int::HasRuntimeTypeGetter && #t13.$is$B && (let dynamic #t14 = n ew typ::Interface::•(self::$declarations.[](1), <dynamic>[new typ::Interface::•( self::$declarations.[](2))]) in typ::isSubtypeOf(#t13.$type, #t14))));
96 tes::expectTrue(!(let dynamic #t15 = new self::A::internal(new typ::Interface: :•(self::$declarations.[](0), <dynamic>[new typ::Interface::•(self::$declaration s.[](2))])) in #t15 is int::HasRuntimeTypeGetter && #t15.$is$B && (let dynamic # t16 = new typ::Interface::•(self::$declarations.[](1), <dynamic>[new typ::Interf ace::•(self::$declarations.[](2))]) in typ::isSubtypeOf(#t15.$type, #t16))));
97 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/reify/factories_test.dart ('k') | pkg/kernel/testcases/reify/field_initializer2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698