OLD | NEW |
1 library; | 1 library; |
2 import self as self; | 2 import self as self; |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 | 4 |
5 class C extends core::Object { | 5 class C extends core::Object { |
6 field dynamic f = MakeClosure<() → dynamic>(self::closure#C#f#function, null); | 6 field dynamic f = MakeClosure<() → core::String>(self::closure#C#f#function, n
ull); |
7 constructor •() → void | 7 constructor •() → void |
8 : super core::Object::•() | 8 : super core::Object::•() |
9 ; | 9 ; |
10 get g() → dynamic { | 10 get g() → dynamic { |
11 return MakeClosure<(dynamic) → dynamic>(self::closure#C#g#function, null); | 11 return MakeClosure<(dynamic) → core::String>(self::closure#C#g#function, nul
l); |
12 } | 12 } |
13 method a() → dynamic { | 13 method a() → dynamic { |
14 return "a"; | 14 return "a"; |
15 } | 15 } |
16 method b(dynamic x) → dynamic { | 16 method b(dynamic x) → dynamic { |
17 return x; | 17 return x; |
18 } | 18 } |
19 method c(dynamic x, [dynamic y = 2]) → dynamic { | 19 method c(dynamic x, [dynamic y = 2]) → dynamic { |
20 return x.+(y); | 20 return x.+(y); |
21 } | 21 } |
(...skipping 15 matching lines...) Expand all Loading... |
37 #context[1] = this; | 37 #context[1] = this; |
38 return MakeClosure<(dynamic, [dynamic]) → dynamic>(self::closure#C#c, #conte
xt); | 38 return MakeClosure<(dynamic, [dynamic]) → dynamic>(self::closure#C#c, #conte
xt); |
39 } | 39 } |
40 method d#get() → dynamic { | 40 method d#get() → dynamic { |
41 final Vector #context = MakeVector(2); | 41 final Vector #context = MakeVector(2); |
42 #context[1] = this; | 42 #context[1] = this; |
43 return MakeClosure<(dynamic, {y: dynamic}) → dynamic>(self::closure#C#d, #co
ntext); | 43 return MakeClosure<(dynamic, {y: dynamic}) → dynamic>(self::closure#C#d, #co
ntext); |
44 } | 44 } |
45 } | 45 } |
46 class D<T extends core::Object> extends core::Object { | 46 class D<T extends core::Object> extends core::Object { |
47 field dynamic f = MakeClosure<() → dynamic>(self::closure#D#f#function, null); | 47 field dynamic f = MakeClosure<() → core::String>(self::closure#D#f#function, n
ull); |
48 constructor •() → void | 48 constructor •() → void |
49 : super core::Object::•() | 49 : super core::Object::•() |
50 ; | 50 ; |
51 get g() → dynamic { | 51 get g() → dynamic { |
52 return MakeClosure<(dynamic) → dynamic>(self::closure#D#g#function, null); | 52 return MakeClosure<(dynamic) → core::String>(self::closure#D#g#function, nul
l); |
53 } | 53 } |
54 method a() → dynamic { | 54 method a() → dynamic { |
55 return "a"; | 55 return "a"; |
56 } | 56 } |
57 method b(dynamic x) → dynamic { | 57 method b(dynamic x) → dynamic { |
58 return x; | 58 return x; |
59 } | 59 } |
60 method c(dynamic x, [dynamic y = 2]) → dynamic { | 60 method c(dynamic x, [dynamic y = 2]) → dynamic { |
61 return x.+(y); | 61 return x.+(y); |
62 } | 62 } |
(...skipping 15 matching lines...) Expand all Loading... |
78 #context[1] = this; | 78 #context[1] = this; |
79 return MakeClosure<(dynamic, [dynamic]) → dynamic>(self::closure#D#c, #conte
xt); | 79 return MakeClosure<(dynamic, [dynamic]) → dynamic>(self::closure#D#c, #conte
xt); |
80 } | 80 } |
81 method d#get() → dynamic { | 81 method d#get() → dynamic { |
82 final Vector #context = MakeVector(2); | 82 final Vector #context = MakeVector(2); |
83 #context[1] = this; | 83 #context[1] = this; |
84 return MakeClosure<(dynamic, {y: dynamic}) → dynamic>(self::closure#D#d, #co
ntext); | 84 return MakeClosure<(dynamic, {y: dynamic}) → dynamic>(self::closure#D#d, #co
ntext); |
85 } | 85 } |
86 } | 86 } |
87 class E<T extends core::Object> extends core::Object { | 87 class E<T extends core::Object> extends core::Object { |
88 field dynamic f = MakeClosure<() → dynamic>(self::closure#E#f#function, null); | 88 field dynamic f = MakeClosure<() → core::String>(self::closure#E#f#function, n
ull); |
89 constructor •() → void | 89 constructor •() → void |
90 : super core::Object::•() | 90 : super core::Object::•() |
91 ; | 91 ; |
92 get g() → dynamic { | 92 get g() → dynamic { |
93 return MakeClosure<(dynamic) → dynamic>(self::closure#E#g#function, null); | 93 return MakeClosure<(dynamic) → core::String>(self::closure#E#g#function, nul
l); |
94 } | 94 } |
95 method a() → dynamic { | 95 method a() → dynamic { |
96 return "a"; | 96 return "a"; |
97 } | 97 } |
98 method b(self::E::T x) → dynamic { | 98 method b(self::E::T x) → dynamic { |
99 return x; | 99 return x; |
100 } | 100 } |
101 method c(self::E::T x, [self::E::T y = 2]) → dynamic { | 101 method c(self::E::T x, [self::E::T y = 2]) → dynamic { |
102 return x.+(y); | 102 return x.+(y); |
103 } | 103 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 self::expect(42, o.d(40)); | 148 self::expect(42, o.d(40)); |
149 self::expect(42, o.d#get().call(40)); | 149 self::expect(42, o.d#get().call(40)); |
150 self::expect(87, o.d(80, y: 7)); | 150 self::expect(87, o.d(80, y: 7)); |
151 self::expect(87, o.d#get().call(80, y: 7)); | 151 self::expect(87, o.d#get().call(80, y: 7)); |
152 } | 152 } |
153 static method main(dynamic arguments) → dynamic { | 153 static method main(dynamic arguments) → dynamic { |
154 self::test(new self::C::•()); | 154 self::test(new self::C::•()); |
155 self::test(new self::D::•<core::int>()); | 155 self::test(new self::D::•<core::int>()); |
156 self::test(new self::E::•<core::int>()); | 156 self::test(new self::E::•<core::int>()); |
157 } | 157 } |
158 static method closure#C#g#function(Vector #contextParameter, dynamic x) → dynami
c { | 158 static method closure#C#g#function(Vector #contextParameter, dynamic x) → core::
String { |
159 return "g(${x})"; | 159 return "g(${x})"; |
160 } | 160 } |
161 static method closure#C#a(Vector #contextParameter) → dynamic | 161 static method closure#C#a(Vector #contextParameter) → dynamic |
162 return (#contextParameter[1]).{self::C::a}(); | 162 return (#contextParameter[1]).{self::C::a}(); |
163 static method closure#C#b(Vector #contextParameter, dynamic x) → dynamic | 163 static method closure#C#b(Vector #contextParameter, dynamic x) → dynamic |
164 return (#contextParameter[1]).{self::C::b}(x); | 164 return (#contextParameter[1]).{self::C::b}(x); |
165 static method closure#C#c(Vector #contextParameter, dynamic x, [dynamic y = 2])
→ dynamic | 165 static method closure#C#c(Vector #contextParameter, dynamic x, [dynamic y = 2])
→ dynamic |
166 return (#contextParameter[1]).{self::C::c}(x, y); | 166 return (#contextParameter[1]).{self::C::c}(x, y); |
167 static method closure#C#d(Vector #contextParameter, dynamic x, {dynamic y = 2})
→ dynamic | 167 static method closure#C#d(Vector #contextParameter, dynamic x, {dynamic y = 2})
→ dynamic |
168 return (#contextParameter[1]).{self::C::d}(x, y: y); | 168 return (#contextParameter[1]).{self::C::d}(x, y: y); |
169 static method closure#C#f#function(Vector #contextParameter) → dynamic { | 169 static method closure#C#f#function(Vector #contextParameter) → core::String { |
170 return "f"; | 170 return "f"; |
171 } | 171 } |
172 static method closure#D#g#function(Vector #contextParameter, dynamic x) → dynami
c { | 172 static method closure#D#g#function(Vector #contextParameter, dynamic x) → core::
String { |
173 return "g(${x})"; | 173 return "g(${x})"; |
174 } | 174 } |
175 static method closure#D#a(Vector #contextParameter) → dynamic | 175 static method closure#D#a(Vector #contextParameter) → dynamic |
176 return (#contextParameter[1]).{self::D::a}(); | 176 return (#contextParameter[1]).{self::D::a}(); |
177 static method closure#D#b(Vector #contextParameter, dynamic x) → dynamic | 177 static method closure#D#b(Vector #contextParameter, dynamic x) → dynamic |
178 return (#contextParameter[1]).{self::D::b}(x); | 178 return (#contextParameter[1]).{self::D::b}(x); |
179 static method closure#D#c(Vector #contextParameter, dynamic x, [dynamic y = 2])
→ dynamic | 179 static method closure#D#c(Vector #contextParameter, dynamic x, [dynamic y = 2])
→ dynamic |
180 return (#contextParameter[1]).{self::D::c}(x, y); | 180 return (#contextParameter[1]).{self::D::c}(x, y); |
181 static method closure#D#d(Vector #contextParameter, dynamic x, {dynamic y = 2})
→ dynamic | 181 static method closure#D#d(Vector #contextParameter, dynamic x, {dynamic y = 2})
→ dynamic |
182 return (#contextParameter[1]).{self::D::d}(x, y: y); | 182 return (#contextParameter[1]).{self::D::d}(x, y: y); |
183 static method closure#D#f#function(Vector #contextParameter) → dynamic { | 183 static method closure#D#f#function(Vector #contextParameter) → core::String { |
184 return "f"; | 184 return "f"; |
185 } | 185 } |
186 static method closure#E#g#function(Vector #contextParameter, dynamic x) → dynami
c { | 186 static method closure#E#g#function(Vector #contextParameter, dynamic x) → core::
String { |
187 return "g(${x})"; | 187 return "g(${x})"; |
188 } | 188 } |
189 static method closure#E#a(Vector #contextParameter) → dynamic | 189 static method closure#E#a(Vector #contextParameter) → dynamic |
190 return (#contextParameter[1]).{self::E::a}(); | 190 return (#contextParameter[1]).{self::E::a}(); |
191 static method closure#E#b(Vector #contextParameter, dynamic x) → dynamic | 191 static method closure#E#b(Vector #contextParameter, dynamic x) → dynamic |
192 return (#contextParameter[1]).{self::E::b}(x); | 192 return (#contextParameter[1]).{self::E::b}(x); |
193 static method closure#E#c(Vector #contextParameter, dynamic x, [dynamic y = 2])
→ dynamic | 193 static method closure#E#c(Vector #contextParameter, dynamic x, [dynamic y = 2])
→ dynamic |
194 return (#contextParameter[1]).{self::E::c}(x, y); | 194 return (#contextParameter[1]).{self::E::c}(x, y); |
195 static method closure#E#d(Vector #contextParameter, dynamic x, {dynamic y = 2})
→ dynamic | 195 static method closure#E#d(Vector #contextParameter, dynamic x, {dynamic y = 2})
→ dynamic |
196 return (#contextParameter[1]).{self::E::d}(x, y: y); | 196 return (#contextParameter[1]).{self::E::d}(x, y: y); |
197 static method closure#E#f#function(Vector #contextParameter) → dynamic { | 197 static method closure#E#f#function(Vector #contextParameter) → core::String { |
198 return "f"; | 198 return "f"; |
199 } | 199 } |
OLD | NEW |