| OLD | NEW |
| 1 var methods; | 1 var methods; |
| 2 (function (methods) { | 2 (function(methods) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 class A extends dart.Object { | 4 class A extends dart.Object { |
| 5 A() { | 5 A() { |
| 6 this._c = 3; | 6 this._c = 3; |
| 7 } | 7 } |
| 8 x() { return 42; } | 8 x() { |
| 9 return 42; |
| 10 } |
| 9 y(a) { | 11 y(a) { |
| 10 return a; | 12 return a; |
| 11 } | 13 } |
| 12 z(b) { | 14 z(b) { |
| 13 if (b === undefined) b = null; | 15 if (b === void 0) |
| 14 return dart.notNull(b) | 16 b = null; |
| 17 return dart.notNull(b); |
| 15 } | 18 } |
| 16 zz(b) { | 19 zz(b) { |
| 17 if (b === undefined) b = 0; | 20 if (b === void 0) |
| 18 return b | 21 b = 0; |
| 22 return b; |
| 19 } | 23 } |
| 20 w(a, opt$) { | 24 w(a, opt$) { |
| 21 let b = opt$.b === undefined ? null : opt$.b; | 25 let b = opt$.b === void 0 ? null : opt$.b; |
| 22 return dart.notNull(a + dart.notNull(b)); | 26 return dart.notNull(a + dart.notNull(b)); |
| 23 } | 27 } |
| 24 ww(a, opt$) { | 28 ww(a, opt$) { |
| 25 let b = opt$.b === undefined ? 0 : opt$.b; | 29 let b = opt$.b === void 0 ? 0 : opt$.b; |
| 26 return a + b; | 30 return a + b; |
| 27 } | 31 } |
| 28 get a() { return this.x(); } | 32 get a() { |
| 29 set b(b) { | 33 return this.x(); |
| 30 } | 34 } |
| 31 get c() { return this._c; } | 35 set b(b) {} |
| 36 get c() { |
| 37 return this._c; |
| 38 } |
| 32 set c(c) { | 39 set c(c) { |
| 33 this._c = c; | 40 this._c = c; |
| 34 } | 41 } |
| 35 } | 42 } |
| 36 | |
| 37 class Bar extends dart.Object { | 43 class Bar extends dart.Object { |
| 38 call(x) { return core.print(`hello from ${x}`); } | 44 call(x) { |
| 45 return core.print(`hello from ${x}`); |
| 46 } |
| 39 } | 47 } |
| 40 | |
| 41 class Foo extends dart.Object { | 48 class Foo extends dart.Object { |
| 42 Foo() { | 49 Foo() { |
| 43 this.bar = new Bar(); | 50 this.bar = new Bar(); |
| 44 } | 51 } |
| 45 } | 52 } |
| 46 | |
| 47 // Function test: () → dynamic | 53 // Function test: () → dynamic |
| 48 function test() { | 54 function test() { |
| 49 let f = new Foo(); | 55 let f = new Foo(); |
| 50 dart.dinvoke(f, "bar", "Bar's call method!"); | 56 dart.dinvoke(f, 'bar', "Bar's call method!"); |
| 51 } | 57 } |
| 52 | |
| 53 // Exports: | 58 // Exports: |
| 54 methods.A = A; | 59 methods.A = A; |
| 55 methods.Bar = Bar; | 60 methods.Bar = Bar; |
| 56 methods.Foo = Foo; | 61 methods.Foo = Foo; |
| 57 methods.test = test; | 62 methods.test = test; |
| 58 })(methods || (methods = {})); | 63 })(methods || (methods = {})); |
| OLD | NEW |