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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library elements.modelx; 5 library elements.modelx;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 8
9 import 'elements.dart'; 9 import 'elements.dart';
10 import '../../compiler.dart' as api; 10 import '../../compiler.dart' as api;
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 bool get isMixinApplication => true; 1798 bool get isMixinApplication => true;
1799 bool get hasConstructor => constructor != null; 1799 bool get hasConstructor => constructor != null;
1800 bool get hasLocalScopeMembers => false; 1800 bool get hasLocalScopeMembers => false;
1801 1801
1802 Token position() => node.getBeginToken(); 1802 Token position() => node.getBeginToken();
1803 1803
1804 Node parseNode(DiagnosticListener listener) => node; 1804 Node parseNode(DiagnosticListener listener) => node;
1805 1805
1806 Element localLookup(SourceString name) { 1806 Element localLookup(SourceString name) {
1807 if (this.name == name) return constructor; 1807 if (this.name == name) return constructor;
1808 if (mixin != null) return mixin.localLookup(name); 1808 if (mixin == null) return null;
1809 Element mixedInElement = mixin.localLookup(name);
1810 if (mixedInElement == null) return null;
1811 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
1809 } 1812 }
1810 1813
1811 void forEachLocalMember(void f(Element member)) { 1814 void forEachLocalMember(void f(Element member)) {
1812 if (mixin != null) mixin.forEachLocalMember(f); 1815 if (mixin != null) mixin.forEachLocalMember((Element mixedInElement) {
ahe 2013/07/18 12:59:49 Weird indentation.
1816 if (mixedInElement.isInstanceMember()) f(mixedInElement);
1817 });
1813 } 1818 }
1814 1819
1815 void addMember(Element element, DiagnosticListener listener) { 1820 void addMember(Element element, DiagnosticListener listener) {
1816 throw new UnsupportedError("cannot add member to $this"); 1821 throw new UnsupportedError("cannot add member to $this");
1817 } 1822 }
1818 1823
1819 void addToScope(Element element, DiagnosticListener listener) { 1824 void addToScope(Element element, DiagnosticListener listener) {
1820 throw new UnsupportedError("cannot add to scope of $this"); 1825 throw new UnsupportedError("cannot add to scope of $this");
1821 } 1826 }
1822 1827
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 1964
1960 MetadataAnnotation ensureResolved(Compiler compiler) { 1965 MetadataAnnotation ensureResolved(Compiler compiler) {
1961 if (resolutionState == STATE_NOT_STARTED) { 1966 if (resolutionState == STATE_NOT_STARTED) {
1962 compiler.resolver.resolveMetadataAnnotation(this); 1967 compiler.resolver.resolveMetadataAnnotation(this);
1963 } 1968 }
1964 return this; 1969 return this;
1965 } 1970 }
1966 1971
1967 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 1972 String toString() => 'MetadataAnnotation($value, $resolutionState)';
1968 } 1973 }
OLDNEW
« 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