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

Unified Diff: test/browser/runtime_tests.js

Issue 1293293002: Attach type info to extension method and object method tear-offs (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 4 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
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/expect/js_test.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/browser/runtime_tests.js
diff --git a/test/browser/runtime_tests.js b/test/browser/runtime_tests.js
index 63f9e67ff24adc9e3ed908c70375583b444d206b..e6fcff766cb275658fdd4da6463aa795b1c92375 100644
--- a/test/browser/runtime_tests.js
+++ b/test/browser/runtime_tests.js
@@ -675,6 +675,16 @@ suite('instanceOf', () => {
checkType(c.ListBase.listToString,
dart.functionType(core.String, [core.String]), false, true);
+ // Tear-off of extension methods on primitives
+ checkType(dart.bind(3.0, dartx.floor),
+ dart.functionType(core.int, []));
+ checkType(dart.bind(3.0, dartx.floor),
+ dart.functionType(core.String, []), false, true);
+ checkType(dart.bind("", dartx.endsWith),
+ dart.functionType(core.bool, [core.String]));
+ checkType(dart.bind("", dartx.endsWith),
+ dart.functionType(core.bool, [core.int]), false, true);
+
// Tear off a mixin method
class Base {
m(x) {return x;}
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/expect/js_test.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698