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

Unified Diff: lib/src/checker/rules.dart

Issue 1245013002: some fixes for --strong warnings (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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: lib/src/checker/rules.dart
diff --git a/lib/src/checker/rules.dart b/lib/src/checker/rules.dart
index bcc1f3ec8840749adf2a2bd0c16a1314d2c624f7..6b9cb98a7865c45f6c6812332e1e1cec13f353e0 100644
--- a/lib/src/checker/rules.dart
+++ b/lib/src/checker/rules.dart
@@ -470,12 +470,12 @@ class RestrictedRules extends TypeRules {
/// Returns `true` if the expression is a dynamic function call or method
/// invocation.
bool isDynamicCall(Expression call) {
- var t = getTypeAsCaller(call);
+ var ft = getTypeAsCaller(call);
// TODO(leafp): This will currently return true if t is Function
// This is probably the most correct thing to do for now, since
// this code is also used by the back end. Maybe revisit at some
// point?
- if (t == null) return true;
+ if (ft == null) return true;
// Dynamic as the parameter type is treated as bottom. A function with
// a dynamic parameter type requires a dynamic call in general.
// However, as an optimization, if we have an original definition, we know
@@ -488,7 +488,6 @@ class RestrictedRules extends TypeRules {
}
}
- var ft = t as FunctionType;
return _anyParameterType(ft, (pt) => pt.isDynamic);
}
}

Powered by Google App Engine
This is Rietveld 408576698