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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 18090004: Add regression test for r24720. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment. Created 7 years, 5 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/language/regress_r24720_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 332648302db14261ebbf283dddf530620be415d7..5b7d5427781ff8118ff87c6aa19eb0f868c86a4d 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -1347,6 +1347,10 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
// type parameters. Those values are in the [supertype]
// declaration of [subclass].
ClassElement subclass = inlinedFromElement.getEnclosingClass();
+ // If [inlinedFromElement] is a generative constructor then [superclass]
+ // is a superclass of [subclass]. If [inlinedFromElement] is a
+ // redirecting constructor then [superclass] is the same as [subclass].
+ // Using [DartType.asInstanceOf] handles both these cases.
InterfaceType supertype = subclass.thisType.asInstanceOf(superclass);
Link<DartType> typeVariables = superclass.typeVariables;
supertype.typeArguments.forEach((DartType argument) {
« no previous file with comments | « no previous file | tests/language/regress_r24720_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698