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

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

Issue 2756693002: Add generic-methods 'golden' tests for 'reify' transformation (Closed)
Patch Set: Created 3 years, 9 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 generic_methods_overriding_contravariance_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 }
16 class Y extends self::X implements int::HasRuntimeTypeGetter {
17 constructor •() → void
18 : super self::X::•()
19 ;
20 get $type() → typ::ReifiedType
21 return new typ::Interface::•(self::$declarations.[](1));
22 }
23 class Z extends self::Y implements int::HasRuntimeTypeGetter {
24 constructor •() → void
25 : super self::Y::•()
26 ;
27 get $type() → typ::ReifiedType
28 return new typ::Interface::•(self::$declarations.[](2));
29 }
30 class C extends core::Object implements int::HasRuntimeTypeGetter {
31 constructor •() → void
32 : super core::Object::•()
33 ;
34 method fun<T extends self::Y>(dynamic t, {core::List<typ::ReifiedType> $typePa rameters}) → core::String {
35 return "C";
36 }
37 get $type() → typ::ReifiedType
38 return new typ::Interface::•(self::$declarations.[](3));
39 }
40 class E extends self::C implements int::HasRuntimeTypeGetter {
41 constructor •() → void
42 : super self::C::•()
43 ;
44 method fun<T extends self::Y>(self::Y y, {core::List<typ::ReifiedType> $typePa rameters}) → core::String {
45 return "E";
46 }
47 get $type() → typ::ReifiedType
48 return new typ::Interface::•(self::$declarations.[](4));
49 }
50 static final field core::List<dec::Class> $declarations = (core::List<dec::Class > d) → core::List<dec::Class> {
51 dec::init(d, 0, new typ::Interface::•(d.[](18)));
52 dec::init(d, 1, new typ::Interface::•(d.[](0)));
53 dec::init(d, 2, new typ::Interface::•(d.[](1)));
54 dec::init(d, 3, new typ::Interface::•(d.[](18)));
55 dec::init(d, 4, new typ::Interface::•(d.[](3)));
56 dec::init(d, 5, new typ::Interface::•(d.[](18)));
57 dec::init(d, 6, new typ::Interface::•(d.[](18)));
58 dec::init(d, 7, new typ::Interface::•(d.[](18)), <dynamic>[new typ::Interface: :•(d.[](20), <dynamic>[new typ::Interface::•(d.[](7))]), new typ::Interface::•(d .[](21))]);
59 dec::init(d, 8, new typ::Interface::•(d.[](22)));
60 dec::init(d, 9, new typ::Interface::•(d.[](22)));
61 dec::init(d, 10, new typ::Interface::•(d.[](18)));
62 dec::init(d, 11, new typ::Interface::•(d.[](23)));
63 dec::init(d, 12, new typ::Interface::•(d.[](23)));
64 dec::init(d, 13, new typ::Interface::•(d.[](23)));
65 dec::init(d, 14, new typ::Interface::•(d.[](23)));
66 dec::init(d, 15, new typ::Interface::•(d.[](18)), <dynamic>[new typ::Interface ::•(d.[](24))]);
67 dec::init(d, 16, new typ::Interface::•(d.[](17)));
68 dec::init(d, 17, new typ::Interface::•(d.[](23)));
69 dec::init(d, 18, null);
70 dec::init(d, 20, new typ::Interface::•(d.[](18)));
71 dec::init(d, 21, new typ::Interface::•(d.[](18)));
72 dec::init(d, 22, new typ::Interface::•(d.[](18)), <dynamic>[new typ::Interface ::•(d.[](20), <dynamic>[new typ::Interface::•(d.[](22))])]);
73 dec::init(d, 23, new typ::Interface::•(d.[](18)));
74 dec::init(d, 24, new typ::Interface::•(d.[](18)));
75 return d;
76 }.call(dec::allocateDeclarations(<dynamic>["X", "Y", "Z", "C", "E", "Null", "boo l", "String", "int", "double", "Type", "AbstractClassInstantiationError", "NoSuc hMethodError", "CyclicInitializationError", "UnsupportedError", "IntegerDivision ByZeroException", "RangeError", "ArgumentError", "Object", "HasRuntimeTypeGetter ", "Comparable", "Pattern", "num", "Error", "Exception"], <dynamic>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]));
77 static method main() → dynamic {
78 self::Y y = new self::Y::•();
79 self::C c = new self::C::•();
80 self::E e = new self::E::•();
81 tes::expectTrue(c.{self::C::fun}(y, $typeParameters: <typ::ReifiedType>[new ty p::Interface::•(self::$declarations.[](1))]).{core::String::==}("C"));
82 tes::expectTrue(e.{self::E::fun}(y, $typeParameters: <typ::ReifiedType>[new ty p::Interface::•(self::$declarations.[](1))]).{core::String::==}("E"));
83 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698