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

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

Issue 455393003: Do not add forwarding constructors to a pricate constructor from a different library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. 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 | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('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 42e2cc03774dc2a5fd2d2179984834a2f424ebee..5420dcae4799457624cf118c94a245b60e8c470c 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -4321,6 +4321,14 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
if (!member.isGenerativeConstructor) return;
FunctionElement forwarder =
createForwardingConstructor(member, mixinApplication);
+ if (isPrivateName(member.name) &&
+ mixinApplication.library != superclass.library) {
+ // Do not create a forwarder to the super constructor, because the mixin
+ // application is in a different library than the constructor in the
+ // super class and it is not possible to call that constructor from the
+ // library using the mixin application.
+ return;
+ }
mixinApplication.addConstructor(forwarder);
});
calculateAllSupertypes(mixinApplication);
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698