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

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

Issue 11776037: Initial support for mixins in dartc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot MixinScope.java Created 7 years, 11 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/Resolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index 6a9c2b352558b975891781db5ab9ef569b0ce876..f40cb666b9aa9fa87c9f44224695d4e92c79cd51 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -22,6 +22,7 @@ import com.google.dart.compiler.ast.DartBreakStatement;
import com.google.dart.compiler.ast.DartCase;
import com.google.dart.compiler.ast.DartCatchBlock;
import com.google.dart.compiler.ast.DartClass;
+import com.google.dart.compiler.ast.DartClassTypeAlias;
import com.google.dart.compiler.ast.DartComment;
import com.google.dart.compiler.ast.DartCommentNewName;
import com.google.dart.compiler.ast.DartCommentRefName;
@@ -358,6 +359,21 @@ public class Resolver {
}
return null;
}
+
+ @Override
+ public Element visitClassTypeAlias(DartClassTypeAlias cls) {
+ ClassNodeElement classElement = cls.getElement();
+ try {
+ classElement.getAllSupertypes();
+ } catch (CyclicDeclarationException e) {
+ HasSourceInfo errorTarget = e.getElement();
+ if (errorTarget == null) {
+ errorTarget = cls;
+ }
+ onError(errorTarget, ResolverErrorCode.CYCLIC_CLASS, e.getElement().getName());
+ }
+ return classElement;
+ }
@Override
public Element visitClass(DartClass cls) {

Powered by Google App Engine
This is Rietveld 408576698