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

Unified Diff: lib/compiler/implementation/dart_backend/backend.dart

Issue 10828323: Temporary workaround to process default clauses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart_backend/backend.dart
diff --git a/lib/compiler/implementation/dart_backend/backend.dart b/lib/compiler/implementation/dart_backend/backend.dart
index 0dd811ce17d979ea948092899e1ac4721c196149..167c3cf9cc297873aa305700bbef10b6cadf3c1b 100644
--- a/lib/compiler/implementation/dart_backend/backend.dart
+++ b/lib/compiler/implementation/dart_backend/backend.dart
@@ -147,6 +147,18 @@ class ReferencedElementCollector extends AbstractVisitor {
.collect();
}
+ visitClassNode(ClassNode node) {
+ super.visitClassNode(node);
+ // Temporary hack which should go away once interfaces
+ // and default clauses are out.
+ if (node.defaultClause !== null) {
+ // Resolver cannot resolve parameterized default clauses.
+ TypeAnnotation evilCousine = new TypeAnnotation(
Roman 2012/08/15 14:52:22 What a hack!
Anton Muhin 2012/08/15 15:11:35 Yes, we can! On 2012/08/15 14:52:22, Roman wrote:
+ node.defaultClause.typeName, null);
+ evilCousine.accept(this);
+ }
+ }
+
visitNode(Node node) { node.visitChildren(this); }
visitTypeAnnotation(TypeAnnotation typeAnnotation) {
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698