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

Unified Diff: test/codegen/expect/covariance.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/covariance.js
diff --git a/test/codegen/expect/covariance.js b/test/codegen/expect/covariance.js
index 59f4e3d180a80274ffa812981868b1968d1a2c05..0ee118bfe2e80cf3b76bd1e97cadf8b27b0715af 100644
--- a/test/codegen/expect/covariance.js
+++ b/test/codegen/expect/covariance.js
@@ -17,6 +17,12 @@ var core = dart.import(core);
fn(this[_t]);
}
}
+ dart.setSignature(Foo, {
+ methods: () => ({
+ add: dart.functionType(dart.dynamic, [T]),
+ forEach: dart.functionType(dart.dynamic, [dart.functionType(dart.void, [T])])
+ })
+ });
return Foo;
});
let Foo = Foo$();
@@ -29,11 +35,14 @@ var core = dart.import(core);
super.add(x);
}
}
- // Function main: () → dynamic
+ dart.setSignature(Bar, {
+ methods: () => ({add: dart.functionType(dart.dynamic, [core.int])})
+ });
function main() {
let foo = new Bar();
foo.add('hi');
}
+ dart.fn(main);
// Exports:
exports.Foo$ = Foo$;
exports.Foo = Foo;

Powered by Google App Engine
This is Rietveld 408576698