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

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

Issue 12335071: Issue 8705. Fix for NPE when use method from mixin inside of class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
index aafa4800c13336487604d67ac4f3f3503a9392f6..e40ff71f0e0bc1eb7167a84464b207589e5e3fb8 100644
--- a/compiler/java/com/google/dart/compiler/resolver/MixinScope.java
+++ b/compiler/java/com/google/dart/compiler/resolver/MixinScope.java
@@ -8,11 +8,11 @@ package com.google.dart.compiler.resolver;
* Lexical scope corresponding to a mixin.
*/
class MixinScope extends Scope {
- private final ClassElement classElement;
+ private final ClassElement mixinElement;
- MixinScope(ClassElement classElement, Scope parent) {
- super(classElement.getName(), parent.getLibrary(), parent);
- this.classElement = classElement;
+ MixinScope(ClassElement mixinElement) {
+ super(mixinElement.getName(), mixinElement.getLibrary(), null);
+ this.mixinElement = mixinElement;
}
@Override
@@ -22,6 +22,6 @@ class MixinScope extends Scope {
@Override
public Element findLocalElement(String name) {
- return Elements.findElement(classElement, name);
+ return Elements.findElement(mixinElement, name);
}
}

Powered by Google App Engine
This is Rietveld 408576698