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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 451143004: Create an erroneous element for static private access. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index c5eed12eaf41baf89c44095dbc709d6a32c8066e..4a84bb2aea5842b9a3c07c60e0365ab2dd0b7fbe 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -2643,6 +2643,13 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
return new ElementResult(warnAndCreateErroneousElement(
node, name, kind,
{'className': receiverClass.name, 'memberName': name}));
+ } else if (isPrivateName(name) &&
+ target.library != enclosingElement.library) {
+ registry.registerThrowNoSuchMethod();
+ return new ElementResult(warnAndCreateErroneousElement(
+ node, name, MessageKind.PRIVATE_ACCESS,
+ {'libraryName': target.library.getLibraryOrScriptName(),
+ 'name': name}));
}
} else if (resolvedReceiver.element.isPrefix) {
PrefixElement prefix = resolvedReceiver.element;
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698