Index: sdk/lib/_internal/compiler/implementation/typechecker.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart |
index 3c8bae65cb22613fbe268069c912b2f607ddcacf..61191fcc2b5900a0fd674a06fda867ccc8b10ad9 100644 |
--- a/sdk/lib/_internal/compiler/implementation/typechecker.dart |
+++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart |
@@ -592,7 +592,7 @@ class TypeCheckerVisitor extends Visitor<DartType> { |
return const DynamicAccess(); |
} else if (element.impliesType()) { |
// The literal `Foo` where Foo is a class, a typedef, or a type variable. |
- if (elements.getType(node) != null) { |
+ if (elements.isTypeLiteral(node)) { |
assert(invariant(node, identical(compiler.typeClass, |
elements.getType(node).element), |
message: 'Expected type literal type: ' |