OLD | NEW |
1 dart_library.library('language/closure6_test', null, /* Imports */[ | 1 dart_library.library('language/closure6_test', null, /* Imports */[ |
2 'dart_sdk', | 2 'dart_sdk', |
3 'expect' | 3 'expect' |
4 ], function load__closure6_test(exports, dart_sdk, expect) { | 4 ], function load__closure6_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 closure6_test = Object.create(null); | 10 const closure6_test = Object.create(null); |
| 11 let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core
.int, [])))(); |
| 12 let VoidTonum = () => (VoidTonum = dart.constFn(dart.definiteFunctionType(core
.num, [])))(); |
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); | 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
12 closure6_test.A = class A extends core.Object { | 14 closure6_test.A = class A extends core.Object { |
13 foo() { | 15 foo() { |
14 function length() { | 16 function length() { |
15 return 400; | 17 return 400; |
16 } | 18 } |
17 dart.fn(length, VoidTodynamic()); | 19 dart.fn(length, VoidToint()); |
18 let box_0 = 28; | 20 let box_0 = 28; |
19 let x = 29; | 21 let x = 29; |
20 let f = dart.fn(() => dart.dsend(dart.dsend(dart.dsend(length(), '+', box_
0), '+', x), '+', this.bar()), VoidTodynamic()); | 22 let f = dart.fn(() => dart.notNull(length()) + box_0 + x + dart.notNull(co
re.num._check(this.bar())), VoidTonum()); |
21 return f(); | 23 return f(); |
22 } | 24 } |
23 bar() { | 25 bar() { |
24 return 42; | 26 return 42; |
25 } | 27 } |
26 }; | 28 }; |
27 dart.setSignature(closure6_test.A, { | 29 dart.setSignature(closure6_test.A, { |
28 methods: () => ({ | 30 methods: () => ({ |
29 foo: dart.definiteFunctionType(dart.dynamic, []), | 31 foo: dart.definiteFunctionType(dart.dynamic, []), |
30 bar: dart.definiteFunctionType(dart.dynamic, []) | 32 bar: dart.definiteFunctionType(dart.dynamic, []) |
31 }) | 33 }) |
32 }); | 34 }); |
33 closure6_test.main = function() { | 35 closure6_test.main = function() { |
34 expect$.Expect.equals(499, new closure6_test.A().foo()); | 36 expect$.Expect.equals(499, new closure6_test.A().foo()); |
35 }; | 37 }; |
36 dart.fn(closure6_test.main, VoidTodynamic()); | 38 dart.fn(closure6_test.main, VoidTodynamic()); |
37 // Exports: | 39 // Exports: |
38 exports.closure6_test = closure6_test; | 40 exports.closure6_test = closure6_test; |
39 }); | 41 }); |
OLD | NEW |