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 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 { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 get q() { | 45 get q() { |
46 return 'life, ' + 'the universe ' + 'and everything'; | 46 return 'life, ' + 'the universe ' + 'and everything'; |
47 }, | 47 }, |
48 get z() { | 48 get z() { |
49 return 42; | 49 return 42; |
50 }, | 50 }, |
51 set z(value) { | 51 set z(value) { |
52 exports.y = dart.as(value, core.int); | 52 exports.y = dart.as(value, core.int); |
53 } | 53 } |
54 }); | 54 }); |
| 55 class BaseWithGetter extends core.Object { |
| 56 get foo() { |
| 57 return 1; |
| 58 } |
| 59 } |
| 60 class Derived extends BaseWithGetter { |
| 61 Derived() { |
| 62 this.foo = 2; |
| 63 this.bar = 3; |
| 64 super.BaseWithGetter(); |
| 65 } |
| 66 } |
| 67 dart.virtualField(Derived, 'foo'); |
55 // Function main: () → void | 68 // Function main: () → void |
56 function main() { | 69 function main() { |
57 let a = new A(); | 70 let a = new A(); |
58 foo(a); | 71 foo(a); |
59 bar(a); | 72 bar(a); |
60 core.print(baz(a)); | 73 core.print(baz(a)); |
61 } | 74 } |
62 // Exports: | 75 // Exports: |
63 exports.A = A; | 76 exports.A = A; |
64 exports.B$ = B$; | 77 exports.B$ = B$; |
65 exports.B = B; | 78 exports.B = B; |
66 exports.foo = foo; | 79 exports.foo = foo; |
67 exports.bar = bar; | 80 exports.bar = bar; |
68 exports.baz = baz; | 81 exports.baz = baz; |
69 exports.compute = compute; | 82 exports.compute = compute; |
| 83 exports.BaseWithGetter = BaseWithGetter; |
| 84 exports.Derived = Derived; |
70 exports.main = main; | 85 exports.main = main; |
71 })(fieldtest || (fieldtest = {})); | 86 })(fieldtest || (fieldtest = {})); |
OLD | NEW |