OLD | NEW |
1 dart_library.library('language/cascade_precedence_test', null, /* Imports */[ | 1 dart_library.library('language/cascade_precedence_test', null, /* Imports */[ |
2 'dart_sdk', | 2 'dart_sdk', |
3 'expect' | 3 'expect' |
4 ], function load__cascade_precedence_test(exports, dart_sdk, expect) { | 4 ], function load__cascade_precedence_test(exports, dart_sdk, expect) { |
5 'use strict'; | 5 'use strict'; |
6 const core = dart_sdk.core; | 6 const core = dart_sdk.core; |
7 const dart = dart_sdk.dart; | 7 const dart = dart_sdk.dart; |
8 const dartx = dart_sdk.dartx; | 8 const dartx = dart_sdk.dartx; |
9 const expect$ = expect.expect; | 9 const expect$ = expect.expect; |
10 const cascade_precedence_test = Object.create(null); | 10 const cascade_precedence_test = Object.create(null); |
11 let VoidToFunction = () => (VoidToFunction = dart.constFn(dart.definiteFunctio
nType(core.Function, [])))(); | 11 let VoidToFunction = () => (VoidToFunction = dart.constFn(dart.definiteFunctio
nType(core.Function, [])))(); |
| 12 let VoidToA = () => (VoidToA = dart.constFn(dart.definiteFunctionType(cascade_
precedence_test.A, [])))(); |
12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); | 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
13 cascade_precedence_test.A = class A extends core.Object { | 14 cascade_precedence_test.A = class A extends core.Object { |
14 new(value) { | 15 new(value) { |
15 this.value = value; | 16 this.value = value; |
16 } | 17 } |
17 set(value) { | 18 set(value) { |
18 this.value = value; | 19 this.value = value; |
19 } | 20 } |
20 get() { | 21 get() { |
21 return this.value; | 22 return this.value; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 set: dart.definiteFunctionType(dart.void, [core.int, cascade_precedence_te
st.A]) | 80 set: dart.definiteFunctionType(dart.void, [core.int, cascade_precedence_te
st.A]) |
80 }) | 81 }) |
81 }); | 82 }); |
82 cascade_precedence_test.main = function() { | 83 cascade_precedence_test.main = function() { |
83 let a = new cascade_precedence_test.A(42); | 84 let a = new cascade_precedence_test.A(42); |
84 let original = a; | 85 let original = a; |
85 let b = new cascade_precedence_test.A(87); | 86 let b = new cascade_precedence_test.A(87); |
86 function fa() { | 87 function fa() { |
87 return a; | 88 return a; |
88 } | 89 } |
89 dart.fn(fa, VoidTodynamic()); | 90 dart.fn(fa, VoidToA()); |
90 let box = new cascade_precedence_test.Box(a); | 91 let box = new cascade_precedence_test.Box(a); |
91 expect$.Expect.equals(a, ((() => { | 92 expect$.Expect.equals(a, ((() => { |
92 a.set(37); | 93 a.set(37); |
93 a.get(); | 94 a.get(); |
94 return a; | 95 return a; |
95 })())); | 96 })())); |
96 a.test(37); | 97 a.test(37); |
97 expect$.Expect.equals(a, (() => { | 98 expect$.Expect.equals(a, (() => { |
98 let _ = fa(); | 99 let _ = fa(); |
99 dart.dsend(_, 'set', 42); | 100 _.set(42); |
100 dart.dsend(_, 'get'); | 101 _.get(); |
101 return _; | 102 return _; |
102 })()); | 103 })()); |
103 a.test(42); | 104 a.test(42); |
104 expect$.Expect.equals(a, (() => { | 105 expect$.Expect.equals(a, (() => { |
105 let _ = box.x; | 106 let _ = box.x; |
106 _.set(37); | 107 _.set(37); |
107 _.get(); | 108 _.get(); |
108 return _; | 109 return _; |
109 })()); | 110 })()); |
110 a.test(37); | 111 a.test(37); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 a.set(42); | 161 a.set(42); |
161 a.test(42); | 162 a.test(42); |
162 return a; | 163 return a; |
163 })()); | 164 })()); |
164 box.x.test(42); | 165 box.x.test(42); |
165 }; | 166 }; |
166 dart.fn(cascade_precedence_test.main, VoidTodynamic()); | 167 dart.fn(cascade_precedence_test.main, VoidTodynamic()); |
167 // Exports: | 168 // Exports: |
168 exports.cascade_precedence_test = cascade_precedence_test; | 169 exports.cascade_precedence_test = cascade_precedence_test; |
169 }); | 170 }); |
OLD | NEW |