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

Unified Diff: pkg/analyzer/lib/src/generated/constant.dart

Issue 1004353006: Allow "dynamic" as a constant value in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/constant.dart
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index c5b413d06cd8ea9387aa32f0e97afcc8f3410a6e..dab71f3420c5cb15602ea712bccd6898626e6a99 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -1628,7 +1628,9 @@ class ConstantVisitor extends UnifyingAstVisitor<DartObjectImpl> {
}
return new DartObjectImpl(functionType, new FunctionState(function));
}
- } else if (element is ClassElement || element is FunctionTypeAliasElement) {
+ } else if (element is ClassElement ||
+ element is FunctionTypeAliasElement ||
+ element is DynamicElementImpl) {
return new DartObjectImpl(_typeProvider.typeType, new TypeState(element));
}
// TODO(brianwilkerson) Figure out which error to report.
@@ -5027,6 +5029,9 @@ class TypeState extends InstanceState {
String get typeName => "Type";
@override
+ Element get value => _element;
+
+ @override
bool operator ==(Object object) =>
object is TypeState && (_element == object._element);
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698