OLD | NEW |
1 dart.library('functions', null, /* Imports */[ | 1 dart_library.library('functions', null, /* Imports */[ |
| 2 "dart_runtime/dart", |
2 'dart/core' | 3 'dart/core' |
3 ], /* Lazy imports */[ | 4 ], /* Lazy imports */[ |
4 ], function(exports, core) { | 5 ], function(exports, dart, core) { |
5 'use strict'; | 6 'use strict'; |
| 7 let dartx = dart.dartx; |
6 function bootstrap() { | 8 function bootstrap() { |
7 return dart.list([new Foo()], Foo); | 9 return dart.list([new Foo()], Foo); |
8 } | 10 } |
9 dart.fn(bootstrap, () => dart.functionType(core.List$(Foo), [])); | 11 dart.fn(bootstrap, () => dart.functionType(core.List$(Foo), [])); |
10 let A2B$ = dart.generic(function(A, B) { | 12 let A2B$ = dart.generic(function(A, B) { |
11 let A2B = dart.typedef('A2B', () => dart.functionType(B, [A])); | 13 let A2B = dart.typedef('A2B', () => dart.functionType(B, [A])); |
12 return A2B; | 14 return A2B; |
13 }); | 15 }); |
14 let A2B = A2B$(); | 16 let A2B = A2B$(); |
15 function id(f) { | 17 function id(f) { |
16 return f; | 18 return f; |
17 } | 19 } |
18 dart.fn(id, () => dart.functionType(A2B$(Foo, Foo), [A2B$(Foo, Foo)])); | 20 dart.fn(id, () => dart.functionType(A2B$(Foo, Foo), [A2B$(Foo, Foo)])); |
19 class Foo extends core.Object {} | 21 class Foo extends core.Object {} |
20 function main() { | 22 function main() { |
21 core.print(bootstrap()[dartx.get](0)); | 23 core.print(bootstrap()[dartx.get](0)); |
22 } | 24 } |
23 dart.fn(main, dart.void, []); | 25 dart.fn(main, dart.void, []); |
24 // Exports: | 26 // Exports: |
25 exports.bootstrap = bootstrap; | 27 exports.bootstrap = bootstrap; |
26 exports.A2B$ = A2B$; | 28 exports.A2B$ = A2B$; |
27 exports.A2B = A2B; | 29 exports.A2B = A2B; |
28 exports.id = id; | 30 exports.id = id; |
29 exports.Foo = Foo; | 31 exports.Foo = Foo; |
30 exports.main = main; | 32 exports.main = main; |
31 }); | 33 }); |
OLD | NEW |