Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: test/codegen/expect/methods.js

Issue 1138793002: Tag closures with their types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/codegen/expect/methods.js
diff --git a/test/codegen/expect/methods.js b/test/codegen/expect/methods.js
index 222970e71c12783aef6c4a375d8bc0f076e2d913..b379e950dff2a0a3f888de2336b2a4d31401ba6a 100644
--- a/test/codegen/expect/methods.js
+++ b/test/codegen/expect/methods.js
@@ -42,21 +42,39 @@ var core = dart.import(core);
this[_c] = c;
}
}
+ dart.setSignature(A, {
+ methods: () => ({
+ x: dart.functionType(core.int, []),
+ y: dart.functionType(core.int, [core.int]),
+ z: dart.functionType(core.int, [], [core.num]),
+ zz: dart.functionType(core.int, [], [core.int]),
+ w: dart.functionType(core.int, [core.int], {b: core.num}),
+ ww: dart.functionType(core.int, [core.int], {b: core.int})
+ })
+ });
class Bar extends core.Object {
call(x) {
return core.print(`hello from ${x}`);
}
}
+ dart.setSignature(Bar, {
+ methods: () => ({call: dart.functionType(dart.dynamic, [dart.dynamic])})
+ });
class Foo extends core.Object {
Foo() {
this.bar = new Bar();
}
}
- // Function test: () → dynamic
+ dart.setSignature(Foo, {});
function test() {
let f = new Foo();
dart.dcall(f.bar, "Bar's call method!");
+ let a = new A();
+ let g = a.x.bind(a);
+ let aa = new A();
+ let h = dart.dload(aa, 'x');
}
+ dart.fn(test);
// Exports:
exports.A = A;
exports.Bar = Bar;

Powered by Google App Engine
This is Rietveld 408576698