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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 12051009: Disallow access to static members of mixed in classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« 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: sdk/lib/_internal/compiler/implementation/elements/modelx.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index a4490ff7fe8ec06d59c25b29d6fc927f44e10710..55f2be9eba0ef230fb1ef507335e2bf9c5c8457b 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -1805,11 +1805,16 @@ class MixinApplicationElementX extends BaseClassElementX
Element localLookup(SourceString name) {
if (this.name == name) return constructor;
- if (mixin != null) return mixin.localLookup(name);
+ if (mixin == null) return null;
+ Element mixedInElement = mixin.localLookup(name);
+ if (mixedInElement == null) return null;
+ return mixedInElement.isInstanceMember() ? mixedInElement : null;
Johnni Winther 2013/01/22 09:51:06 In time, it might be better for the user feedback
kasperl 2013/01/22 10:30:03 True, so we would probably need a way of looking t
}
void forEachLocalMember(void f(Element member)) {
- if (mixin != null) mixin.forEachLocalMember(f);
+ if (mixin != null) mixin.forEachLocalMember((Element mixedInElement) {
ahe 2013/07/18 12:59:49 Weird indentation.
+ if (mixedInElement.isInstanceMember()) f(mixedInElement);
+ });
}
void addMember(Element element, DiagnosticListener listener) {
« 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