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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.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
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index b4048bdb8d3444d0286096947a2b3b11c9ad54e8..39dd8684cf042452effc1f4d738fa24a7a111709 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -1762,13 +1762,21 @@ class SsaBuilder extends ResolvedVisitor {
}
Element target = constructor.definingConstructor.implementation;
- Selector.addForwardingElementArgumentsToList(
+ bool match = Selector.addForwardingElementArgumentsToList(
constructor,
arguments,
target,
compileArgument,
handleConstantForOptionalParameter,
compiler);
+ if (!match) {
+ // If this fails, the selector we constructed for the call to a
+ // forwarding constructor in a mixin application did not match the
+ // constructor (which, for example, may happen when the libraries are
+ // not compatible for private names, see issue 20394).
+ compiler.internalError(constructor,
+ 'forwarding constructor call does not match');
+ }
inlineSuperOrRedirect(
target,
arguments,

Powered by Google App Engine
This is Rietveld 408576698