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

Unified Diff: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart

Issue 14260012: Do not infer types of arguments of closures and methods named "call". (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (revision 22108)
+++ sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (working copy)
@@ -829,6 +829,11 @@
ArgumentsTypes arguments,
Selector constraint,
bool inLoop) {
+ // Bailout for closure calls. We're not tracking types of
+ // arguments for closures.
+ if (callee.isInstanceMember() && selector.isClosureCall()) {
+ return;
+ }
if (inLoop) {
// For instance methods, we only register a selector called in a
// loop if it is a typed selector, to avoid marking too many

Powered by Google App Engine
This is Rietveld 408576698