Index: sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart b/sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart |
index 807b896a002dc336106c20c55eb369fb5d63a43c..60f16082e22e504e0c9aa4324fa6c0bfb6834ee1 100644 |
--- a/sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart |
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/custom_elements_analysis.dart |
@@ -73,16 +73,16 @@ class CustomElementsAnalysis { |
joinFor(enqueuer).instantiatedClasses.add(classElement); |
} |
- void registerTypeLiteral(Element element, Enqueuer enqueuer) { |
+ void registerTypeLiteral(DartType type, Enqueuer enqueuer) { |
// In codegen we see the TypeConstants instead. |
if (!enqueuer.isResolutionQueue) return; |
- if (element.isClass) { |
+ if (type.isInterfaceType) { |
// TODO(sra): If we had a flow query from the type literal expression to |
// the Type argument of the metadata lookup, we could tell if this type |
// literal is really a demand for the metadata. |
- resolutionJoin.selectedClasses.add(element); |
- } else { |
+ resolutionJoin.selectedClasses.add(type.element); |
+ } else if (type.isTypeVariable) { |
// This is a type parameter of a parameterized class. |
// TODO(sra): Is there a way to determine which types are bound to the |
// parameter? |