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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/MixinScope.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/MixinScope.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/MixinScope.java b/compiler/java/com/google/dart/compiler/resolver/MixinScope.java
new file mode 100644
index 0000000000000000000000000000000000000000..aafa4800c13336487604d67ac4f3f3503a9392f6
--- /dev/null
+++ b/compiler/java/com/google/dart/compiler/resolver/MixinScope.java
@@ -0,0 +1,27 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+package com.google.dart.compiler.resolver;
+
+/**
+ * Lexical scope corresponding to a mixin.
+ */
+class MixinScope extends Scope {
+ private final ClassElement classElement;
+
+ MixinScope(ClassElement classElement, Scope parent) {
+ super(classElement.getName(), parent.getLibrary(), parent);
+ this.classElement = classElement;
+ }
+
+ @Override
+ public Element declareElement(String name, Element element) {
+ throw new AssertionError("not supported yet");
+ }
+
+ @Override
+ public Element findLocalElement(String name) {
+ return Elements.findElement(classElement, name);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698