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

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

Issue 1163393002: remove ignoreTypes flag, to reimplement later, see #134 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/checker/rules.dart
diff --git a/lib/src/checker/rules.dart b/lib/src/checker/rules.dart
index 090831d499ef5e172a67175200941e91f437a832..72dce22c26348a1332ba5dce4433cf735ff49fdc 100644
--- a/lib/src/checker/rules.dart
+++ b/lib/src/checker/rules.dart
@@ -75,11 +75,11 @@ abstract class TypeRules {
DartType elementType(Element e);
- bool isDynamic(DartType t);
bool isDynamicTarget(Expression expr);
bool isDynamicCall(Expression call);
}
+// TODO(jmesserly): this is unused.
class DartRules extends TypeRules {
DartRules(TypeProvider provider) : super(provider);
@@ -465,16 +465,13 @@ class RestrictedRules extends TypeRules {
return (e as dynamic).type;
}
- bool isDynamic(DartType t) => options.ignoreTypes || t.isDynamic;
-
/// Returns `true` if the target expression is dynamic.
- bool isDynamicTarget(Expression target) =>
- options.ignoreTypes || utils.isDynamicTarget(target);
+ // TODO(jmesserly): remove this in favor of utils? Or a static method here?
+ bool isDynamicTarget(Expression target) => utils.isDynamicTarget(target);
/// Returns `true` if the expression is a dynamic function call or method
/// invocation.
bool isDynamicCall(Expression call) {
- if (options.ignoreTypes) return true;
var t = 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
« no previous file with comments | « no previous file | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698