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

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

Issue 1166163002: remove unused allowConstCast option (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format 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/reify_coercions.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 8e5717af4d36681e3e30e62c5b8277b383b6864c..736721aad78454733b98b20570cf0a77d6015227 100644
--- a/lib/src/checker/rules.dart
+++ b/lib/src/checker/rules.dart
@@ -533,10 +533,6 @@ class RestrictedRules extends TypeRules {
if (ok) return InferredType.create(this, expr, toT);
reason = (errors.isNotEmpty) ? errors.first : null;
}
- if (constContext && !options.allowConstCasts) {
- reason = (reason == null) ? "Cast not allowed in const context" : reason;
- return new StaticTypeError(this, expr, toT, reason: reason);
- }
if (c is Cast) return DownCast.create(this, expr, c, reason: reason);
if (c is Wrapper) return ClosureWrap.create(this, expr, c, toT);
assert(false);
« no previous file with comments | « no previous file | lib/src/codegen/reify_coercions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698