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<() → core::String>(self::closure#C#f#function, n
ull); | 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 { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 core::print("Expected '${expected}' but got '${actual}'"); | 71 core::print("Expected '${expected}' but got '${actual}'"); |
72 throw "Expected '${expected}' but got '${actual}'"; | 72 throw "Expected '${expected}' but got '${actual}'"; |
73 } | 73 } |
74 } | 74 } |
75 static method test(dynamic o) → dynamic { | 75 static method test(dynamic o) → dynamic { |
76 self::expect("f", o.f()); | 76 self::expect("f", o.f()); |
77 self::expect("f", o.f.call()); | 77 self::expect("f", o.f.call()); |
78 self::expect("g(42)", o.g(42)); | 78 self::expect("g(42)", o.g(42)); |
79 self::expect("g(42)", o.g.call(42)); | 79 self::expect("g(42)", o.g.call(42)); |
80 self::expect("a", o.a()); | 80 self::expect("a", o.a()); |
| 81 <<<<<<< HEAD |
| 82 self::expect("a", o.a#get.call()); |
| 83 self::expect(42, o.b(42)); |
| 84 self::expect(42, o.b#get.call(42)); |
| 85 self::expect(42, o.c(40)); |
| 86 self::expect(42, o.c#get.call(40)); |
| 87 self::expect(87, o.c(80, 7)); |
| 88 self::expect(87, o.c#get.call(80, 7)); |
| 89 self::expect(42, o.d(40)); |
| 90 self::expect(42, o.d#get.call(40)); |
| 91 self::expect(87, o.d(80, y: 7)); |
| 92 self::expect(87, o.d#get.call(80, y: 7)); |
| 93 ======= |
81 self::expect("a", o.a.call()); | 94 self::expect("a", o.a.call()); |
82 self::expect(42, o.b(42)); | 95 self::expect(42, o.b(42)); |
83 self::expect(42, o.b.call(42)); | 96 self::expect(42, o.b.call(42)); |
84 self::expect(42, o.c(40)); | 97 self::expect(42, o.c(40)); |
85 self::expect(42, o.c.call(40)); | 98 self::expect(42, o.c.call(40)); |
86 self::expect(87, o.c(80, 7)); | 99 self::expect(87, o.c(80, 7)); |
87 self::expect(87, o.c.call(80, 7)); | 100 self::expect(87, o.c.call(80, 7)); |
88 self::expect(42, o.d(40)); | 101 self::expect(42, o.d(40)); |
89 self::expect(42, o.d.call(40)); | 102 self::expect(42, o.d.call(40)); |
90 self::expect(87, o.d(80, y: 7)); | 103 self::expect(87, o.d(80, y: 7)); |
91 self::expect(87, o.d.call(80, y: 7)); | 104 self::expect(87, o.d.call(80, y: 7)); |
| 105 >>>>>>> master |
92 } | 106 } |
93 static method main(dynamic arguments) → dynamic { | 107 static method main(dynamic arguments) → dynamic { |
94 self::test(new self::C::•()); | 108 self::test(new self::C::•()); |
95 self::test(new self::D::•<core::int>()); | 109 self::test(new self::D::•<core::int>()); |
96 self::test(new self::E::•<core::int>()); | 110 self::test(new self::E::•<core::int>()); |
97 } | 111 } |
98 static method closure#C#g#function(Vector #contextParameter, dynamic x) → core::
String { | 112 static method closure#C#g#function(Vector #contextParameter, dynamic x) → core::
String { |
99 return "g(${x})"; | 113 return "g(${x})"; |
100 } | 114 } |
101 static method closure#C#f#function(Vector #contextParameter) → core::String { | 115 static method closure#C#f#function(Vector #contextParameter) → core::String { |
102 return "f"; | 116 return "f"; |
103 } | 117 } |
104 static method closure#D#g#function(Vector #contextParameter, dynamic x) → core::
String { | 118 static method closure#D#g#function(Vector #contextParameter, dynamic x) → core::
String { |
105 return "g(${x})"; | 119 return "g(${x})"; |
106 } | 120 } |
107 static method closure#D#f#function(Vector #contextParameter) → core::String { | 121 static method closure#D#f#function(Vector #contextParameter) → core::String { |
108 return "f"; | 122 return "f"; |
109 } | 123 } |
110 static method closure#E#g#function(Vector #contextParameter, dynamic x) → core::
String { | 124 static method closure#E#g#function(Vector #contextParameter, dynamic x) → core::
String { |
111 return "g(${x})"; | 125 return "g(${x})"; |
112 } | 126 } |
113 static method closure#E#f#function(Vector #contextParameter) → core::String { | 127 static method closure#E#f#function(Vector #contextParameter) → core::String { |
114 return "f"; | 128 return "f"; |
115 } | 129 } |
OLD | NEW |