Index: pkg/compiler/lib/src/js_backend/runtime_types.dart |
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart |
index 036e52ae628f032a01fea020174d2e857ceed1a2..eec53cb2c457698d7965fb8dc1f965bcc5eb501f 100644 |
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart |
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart |
@@ -252,7 +252,12 @@ class _RuntimeTypes implements RuntimeTypes { |
compiler.resolverWorld.isChecks.forEach((DartType type) { |
if (type.isTypeVariable) { |
TypeVariableElement variable = type.element; |
- classesUsingTypeVariableTests.add(variable.typeDeclaration); |
+ // TODO(eernst): When generic method support is complete enough to |
+ // include a runtime value for method type variables, this may need to |
+ // be updated. |
+ if (variable.typeDeclaration is ClassElement) { |
+ classesUsingTypeVariableTests.add(variable.typeDeclaration); |
+ } |
} |
}); |
// Add is-checks that result from classes using type variables in checks. |