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