| Index: pkg/compiler/lib/src/resolution/class_hierarchy.dart
|
| diff --git a/pkg/compiler/lib/src/resolution/class_hierarchy.dart b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
|
| index 7f2a57a167544b612754b76034c704fd6c61c7da..46d63e63aa252577f3ab97524619a8d7a8bfed6d 100644
|
| --- a/pkg/compiler/lib/src/resolution/class_hierarchy.dart
|
| +++ b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
|
| @@ -66,8 +66,8 @@ class TypeDefinitionVisitor extends MappingVisitor<DartType> {
|
|
|
| TypeVariableElementX variableElement = typeVariable.element;
|
| if (typeNode.bound != null) {
|
| - DartType boundType =
|
| - typeResolver.resolveTypeAnnotation(this, typeNode.bound);
|
| + DartType boundType = typeResolver
|
| + .resolveNominalTypeAnnotation(this, typeNode.bound, const []);
|
| variableElement.boundCache = boundType;
|
|
|
| void checkTypeVariableBound() {
|
| @@ -250,8 +250,8 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
|
|
|
| /// Resolves the mixed type for [mixinNode] and checks that the mixin type
|
| /// is a valid, non-blacklisted interface type. The mixin type is returned.
|
| - DartType checkMixinType(TypeAnnotation mixinNode) {
|
| - DartType mixinType = resolveType(mixinNode);
|
| + DartType checkMixinType(NominalTypeAnnotation mixinNode) {
|
| + DartType mixinType = resolveNominalType(mixinNode);
|
| if (isBlackListed(mixinType)) {
|
| reporter.reportErrorMessage(
|
| mixinNode, MessageKind.CANNOT_MIXIN, {'type': mixinType});
|
| @@ -437,12 +437,13 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
|
| return mixinType;
|
| }
|
|
|
| - DartType resolveType(TypeAnnotation node) {
|
| - return typeResolver.resolveTypeAnnotation(this, node);
|
| + DartType resolveNominalType(NominalTypeAnnotation node) {
|
| + return typeResolver.resolveNominalTypeAnnotation(this, node, const []);
|
| }
|
|
|
| - DartType resolveSupertype(ClassElement cls, TypeAnnotation superclass) {
|
| - DartType supertype = resolveType(superclass);
|
| + DartType resolveSupertype(
|
| + ClassElement cls, NominalTypeAnnotation superclass) {
|
| + DartType supertype = resolveNominalType(superclass);
|
| if (supertype != null) {
|
| if (supertype.isMalformed) {
|
| reporter.reportErrorMessage(
|
| @@ -471,7 +472,7 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
|
| Link<DartType> result = const Link<DartType>();
|
| if (interfaces == null) return result;
|
| for (Link<Node> link = interfaces.nodes; !link.isEmpty; link = link.tail) {
|
| - DartType interfaceType = resolveType(link.head);
|
| + DartType interfaceType = resolveNominalType(link.head);
|
| if (interfaceType != null) {
|
| if (interfaceType.isMalformed) {
|
| reporter.reportErrorMessage(
|
| @@ -485,7 +486,7 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
|
| {'className': element.name, 'enumType': interfaceType});
|
| } else if (!interfaceType.isInterfaceType) {
|
| // TODO(johnniwinther): Handle dynamic.
|
| - TypeAnnotation typeAnnotation = link.head;
|
| + NominalTypeAnnotation typeAnnotation = link.head;
|
| reporter.reportErrorMessage(
|
| typeAnnotation.typeName, MessageKind.CLASS_NAME_EXPECTED);
|
| } else {
|
| @@ -610,7 +611,7 @@ class ClassSupertypeResolver extends CommonResolverVisitor {
|
| visitNodeList(node.interfaces);
|
| }
|
|
|
| - void visitTypeAnnotation(TypeAnnotation node) {
|
| + void visitNominalTypeAnnotation(NominalTypeAnnotation node) {
|
| node.typeName.accept(this);
|
| }
|
|
|
|
|