Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: pkg/compiler/lib/src/resolution/class_hierarchy.dart

Issue 2627343004: Revert "Add support for the new function-type syntax." (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/parser/partial_parser.dart ('k') | pkg/compiler/lib/src/resolution/constructors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f9e6480a408dd37beab21bb25533b38158c2c258..a63a09327651d85c4adfb84a71b342c396da4539 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<ResolutionDartType> {
TypeVariableElementX variableElement = typeVariable.element;
if (typeNode.bound != null) {
- ResolutionDartType boundType = typeResolver
- .resolveNominalTypeAnnotation(this, typeNode.bound, const []);
+ ResolutionDartType boundType =
+ typeResolver.resolveTypeAnnotation(this, typeNode.bound);
variableElement.boundCache = boundType;
void checkTypeVariableBound() {
@@ -251,8 +251,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.
- ResolutionDartType checkMixinType(NominalTypeAnnotation mixinNode) {
- ResolutionDartType mixinType = resolveNominalType(mixinNode);
+ ResolutionDartType checkMixinType(TypeAnnotation mixinNode) {
+ ResolutionDartType mixinType = resolveType(mixinNode);
if (isBlackListed(mixinType)) {
reporter.reportErrorMessage(
mixinNode, MessageKind.CANNOT_MIXIN, {'type': mixinType});
@@ -441,13 +441,13 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
return mixinType;
}
- ResolutionDartType resolveNominalType(NominalTypeAnnotation node) {
- return typeResolver.resolveNominalTypeAnnotation(this, node, const []);
+ ResolutionDartType resolveType(TypeAnnotation node) {
+ return typeResolver.resolveTypeAnnotation(this, node);
}
ResolutionDartType resolveSupertype(
- ClassElement cls, NominalTypeAnnotation superclass) {
- ResolutionDartType supertype = resolveNominalType(superclass);
+ ClassElement cls, TypeAnnotation superclass) {
+ ResolutionDartType supertype = resolveType(superclass);
if (supertype != null) {
if (supertype.isMalformed) {
reporter.reportErrorMessage(
@@ -477,7 +477,7 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
Link<ResolutionDartType> result = const Link<ResolutionDartType>();
if (interfaces == null) return result;
for (Link<Node> link = interfaces.nodes; !link.isEmpty; link = link.tail) {
- ResolutionDartType interfaceType = resolveNominalType(link.head);
+ ResolutionDartType interfaceType = resolveType(link.head);
if (interfaceType != null) {
if (interfaceType.isMalformed) {
reporter.reportErrorMessage(
@@ -491,7 +491,7 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
{'className': element.name, 'enumType': interfaceType});
} else if (!interfaceType.isInterfaceType) {
// TODO(johnniwinther): Handle dynamic.
- NominalTypeAnnotation typeAnnotation = link.head;
+ TypeAnnotation typeAnnotation = link.head;
reporter.reportErrorMessage(
typeAnnotation.typeName, MessageKind.CLASS_NAME_EXPECTED);
} else {
@@ -616,7 +616,7 @@ class ClassSupertypeResolver extends CommonResolverVisitor {
visitNodeList(node.interfaces);
}
- void visitNominalTypeAnnotation(NominalTypeAnnotation node) {
+ void visitTypeAnnotation(TypeAnnotation node) {
node.typeName.accept(this);
}
« no previous file with comments | « pkg/compiler/lib/src/parser/partial_parser.dart ('k') | pkg/compiler/lib/src/resolution/constructors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698