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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1382313002: dart2js: set effective target for patched constructors (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 22a9dcba02de0922d275e3248661c74c54eb2cff..0109684f7ba6c14cfd741405f579e2bf3cf3ff8c 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -2227,7 +2227,11 @@ abstract class ConstructorElementX extends FunctionElementX
return immediateRedirectionTarget;
}
assert(!isRedirectingFactory || internalEffectiveTarget != null);
- return isRedirectingFactory ? internalEffectiveTarget : this;
+ if (isRedirectingFactory) return internalEffectiveTarget;
+ if (isPatched) {
+ return internalEffectiveTarget ?? this;
+ }
+ return this;
}
InterfaceType computeEffectiveTargetType(InterfaceType newType) {
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698