Index: pkg/compiler/lib/src/ssa/builder_kernel.dart |
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
index 9d7852c0a7ac661a9c0cfbc14e83e70900a7c596..1fc734fbda894d51b84ccc2690c7aa5bc998cf17 100644 |
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart |
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
@@ -226,15 +226,15 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder { |
void _addClassTypeVariablesIfNeeded(ir.Member constructor) { |
var enclosing = constructor.enclosingClass; |
if (backend.classNeedsRti(astAdapter.getElement(enclosing))) { |
+ ClassElement clsElement = |
+ astAdapter.getElement(constructor).enclosingElement; |
enclosing.typeParameters.forEach((ir.TypeParameter typeParameter) { |
var typeParamElement = astAdapter.getElement(typeParameter); |
HParameterValue param = |
addParameter(typeParamElement, commonMasks.nonNullType); |
- var dart_type = astAdapter.getDartType(typeParameter.bound); |
// This is a little bit wacky (and n^2) until we make the localsHandler |
// take Kernel DartTypes instead of just the AST DartTypes. |
- var typeVariableType = (astAdapter.getElement(constructor)) |
- .enclosingElement |
+ var typeVariableType = clsElement |
.typeVariables |
.firstWhere((TypeVariableType i) => i.name == typeParameter.name); |
localsHandler.directLocals[ |