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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java

Issue 11260031: Issue 6202. Remove support for 'Dynamic'. Add Clean Up to rename to 'dynamic'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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: compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java b/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
index a38c4245a8dde495fd4c86ae86fd861c77c2c3fa..8b6f83ca711ed6fd171e9f2cf8e172e773697b87 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
@@ -213,8 +213,7 @@ public class ResolutionContext implements ResolutionErrorListener {
// Built-in identifier can not be used as a type annotation.
if (identifier instanceof DartIdentifier) {
String name = ((DartIdentifier) identifier).getName();
- if (DartParser.PSEUDO_KEYWORDS_SET.contains(name) && !DartParser.DYNAMIC_KEYWORD.equals(name)
- && !DartParser.DYNAMIC_KEYWORD_DEPRECATED.equals(name)) {
+ if (DartParser.PSEUDO_KEYWORDS_SET.contains(name) && !"dynamic".equals(name)) {
onError(identifier, ResolverErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE, name);
return Types.newDynamicType();
}
@@ -258,10 +257,7 @@ public class ResolutionContext implements ResolutionErrorListener {
if (Elements.isIdentifierName(identifier, "void")) {
return typeProvider.getVoidType();
}
- if (Elements.isIdentifierName(identifier, DartParser.DYNAMIC_KEYWORD)) {
- return typeProvider.getDynamicType();
- }
- if (Elements.isIdentifierName(identifier, DartParser.DYNAMIC_KEYWORD_DEPRECATED)) {
+ if (Elements.isIdentifierName(identifier, "dynamic")) {
return typeProvider.getDynamicType();
}
onError(identifier, errorCode, identifier);

Powered by Google App Engine
This is Rietveld 408576698