OLD | NEW |
1 dart_library.library('methods', null, /* Imports */[ | 1 dart_library.library('methods', null, /* Imports */[ |
2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
3 'dart/core' | 3 'dart/core' |
4 ], /* Lazy imports */[ | 4 ], /* Lazy imports */[ |
5 ], function(exports, dart, core) { | 5 ], function(exports, dart, core) { |
6 'use strict'; | 6 'use strict'; |
7 let dartx = dart.dartx; | 7 let dartx = dart.dartx; |
8 let _c = Symbol('_c'); | 8 let _c = Symbol('_c'); |
9 class A extends core.Object { | 9 class A extends core.Object { |
10 A() { | 10 A() { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 w: [core.int, [core.int], {b: core.num}], | 54 w: [core.int, [core.int], {b: core.num}], |
55 ww: [core.int, [core.int], {b: core.int}] | 55 ww: [core.int, [core.int], {b: core.int}] |
56 }) | 56 }) |
57 }); | 57 }); |
58 class Bar extends core.Object { | 58 class Bar extends core.Object { |
59 call(x) { | 59 call(x) { |
60 return core.print(`hello from ${x}`); | 60 return core.print(`hello from ${x}`); |
61 } | 61 } |
62 } | 62 } |
63 dart.setSignature(Bar, { | 63 dart.setSignature(Bar, { |
64 methods: () => ({call: [core.Object, [core.Object]]}) | 64 methods: () => ({call: [dart.dynamic, [dart.dynamic]]}) |
65 }); | 65 }); |
66 class Foo extends core.Object { | 66 class Foo extends core.Object { |
67 Foo() { | 67 Foo() { |
68 this.bar = new Bar(); | 68 this.bar = new Bar(); |
69 } | 69 } |
70 } | 70 } |
71 function test() { | 71 function test() { |
72 let f = new Foo(); | 72 let f = new Foo(); |
73 dart.dcall(f.bar, "Bar's call method!"); | 73 dart.dcall(f.bar, "Bar's call method!"); |
74 let a = new A(); | 74 let a = new A(); |
75 let g = dart.bind(a, 'x'); | 75 let g = dart.bind(a, 'x'); |
76 let aa = new A(); | 76 let aa = new A(); |
77 let h = dart.dload(aa, 'x'); | 77 let h = dart.dload(aa, 'x'); |
78 } | 78 } |
79 dart.fn(test); | 79 dart.fn(test); |
80 // Exports: | 80 // Exports: |
81 exports.A = A; | 81 exports.A = A; |
82 exports.Bar = Bar; | 82 exports.Bar = Bar; |
83 exports.Foo = Foo; | 83 exports.Foo = Foo; |
84 exports.test = test; | 84 exports.test = test; |
85 }); | 85 }); |
OLD | NEW |