OLD | NEW |
1 var fieldtest; | 1 var fieldtest; |
2 (function(exports) { | 2 (function(exports) { |
3 'use strict'; | 3 'use strict'; |
4 class A extends core.Object { | 4 class A extends core.Object { |
5 A() { | 5 A() { |
6 this.x = 42; | 6 dart.initField(A, this, 'x', 42); |
7 } | 7 } |
8 } | 8 } |
9 let B$ = dart.generic(function(T) { | 9 let B$ = dart.generic(function(T) { |
10 class B extends core.Object { | 10 class B extends core.Object { |
11 B() { | 11 B() { |
12 this.x = null; | 12 dart.initField(B, this, 'x', null); |
13 this.y = null; | 13 dart.initField(B, this, 'y', null); |
14 this.z = null; | 14 dart.initField(B, this, 'z', null); |
15 } | 15 } |
16 } | 16 } |
17 return B; | 17 return B; |
18 }); | 18 }); |
19 let B = B$(); | 19 let B = B$(); |
20 // Function foo: (A) → int | 20 // Function foo: (A) → int |
21 function foo(a) { | 21 function foo(a) { |
22 core.print(a.x); | 22 core.print(a.x); |
23 return a.x; | 23 return a.x; |
24 } | 24 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Exports: | 62 // Exports: |
63 exports.A = A; | 63 exports.A = A; |
64 exports.B$ = B$; | 64 exports.B$ = B$; |
65 exports.B = B; | 65 exports.B = B; |
66 exports.foo = foo; | 66 exports.foo = foo; |
67 exports.bar = bar; | 67 exports.bar = bar; |
68 exports.baz = baz; | 68 exports.baz = baz; |
69 exports.compute = compute; | 69 exports.compute = compute; |
70 exports.main = main; | 70 exports.main = main; |
71 })(fieldtest || (fieldtest = {})); | 71 })(fieldtest || (fieldtest = {})); |
OLD | NEW |