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<() → dynamic>(self::closure#C#f#function, null); |
7 constructor •() → void | 7 constructor •() → void |
8 : super core::Object::•() | 8 : super core::Object::•() |
9 ; | 9 ; |
10 get g() → dynamic { | 10 get g() → dynamic { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 core::print("Expected '${expected}' but got '${actual}'"); | 131 core::print("Expected '${expected}' but got '${actual}'"); |
132 throw "Expected '${expected}' but got '${actual}'"; | 132 throw "Expected '${expected}' but got '${actual}'"; |
133 } | 133 } |
134 } | 134 } |
135 static method test(dynamic o) → dynamic { | 135 static method test(dynamic o) → dynamic { |
136 self::expect("f", o.f()); | 136 self::expect("f", o.f()); |
137 self::expect("f", o.f.call()); | 137 self::expect("f", o.f.call()); |
138 self::expect("g(42)", o.g(42)); | 138 self::expect("g(42)", o.g(42)); |
139 self::expect("g(42)", o.g.call(42)); | 139 self::expect("g(42)", o.g.call(42)); |
140 self::expect("a", o.a()); | 140 self::expect("a", o.a()); |
141 self::expect("a", o.a#get().call()); | 141 self::expect("a", o.a#get.call()); |
142 self::expect(42, o.b(42)); | 142 self::expect(42, o.b(42)); |
143 self::expect(42, o.b#get().call(42)); | 143 self::expect(42, o.b#get.call(42)); |
144 self::expect(42, o.c(40)); | 144 self::expect(42, o.c(40)); |
145 self::expect(42, o.c#get().call(40)); | 145 self::expect(42, o.c#get.call(40)); |
146 self::expect(87, o.c(80, 7)); | 146 self::expect(87, o.c(80, 7)); |
147 self::expect(87, o.c#get().call(80, 7)); | 147 self::expect(87, o.c#get.call(80, 7)); |
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) → dynami
c { |
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 |
(...skipping 28 matching lines...) Expand all Loading... |
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) → dynamic { |
198 return "f"; | 198 return "f"; |
199 } | 199 } |
OLD | NEW |