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

Unified Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Fixes after rebase. Created 3 years, 10 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
Index: pkg/compiler/lib/src/kernel/kernel_visitor.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel_visitor.dart b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
index d4562e0208a84e0dbefe94a26ab3799b37eec0a1..f8598a179808c5304ea1a9f2ac3366c75edd5a51 100644
--- a/pkg/compiler/lib/src/kernel/kernel_visitor.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
@@ -105,6 +105,7 @@ import '../tree/tree.dart'
ForIn,
FunctionDeclaration,
FunctionExpression,
+ FunctionTypeAnnotation,
Identifier,
If,
Label,
@@ -123,6 +124,7 @@ import '../tree/tree.dart'
NewExpression,
Node,
NodeList,
+ NominalTypeAnnotation,
Operator,
ParenthesizedExpression,
RedirectingFactoryBody,
@@ -1121,14 +1123,28 @@ class KernelVisitor extends Object
@override
visitTypeAnnotation(TypeAnnotation node) {
- // Shouldn't be called, as the resolver have already resolved types and
+ // Shouldn't be called, as the resolver has already resolved types and
// created [DartType] objects.
return internalError(node, "TypeAnnotation");
}
@override
+ visitNominalTypeAnnotation(NominalTypeAnnotation node) {
+ // Shouldn't be called, as the resolver has already resolved types and
+ // created [DartType] objects.
+ return internalError(node, "NominalTypeAnnotation");
+ }
+
+ @override
+ visitFunctionTypeAnnotation(FunctionTypeAnnotation node) {
+ // Shouldn't be called, as the resolver has already resolved types and
+ // created [DartType] objects.
+ return internalError(node, "FunctionTypeAnnotation");
+ }
+
+ @override
visitTypeVariable(TypeVariable node) {
- // Shouldn't be called, as the resolver have already resolved types and
+ // Shouldn't be called, as the resolver has already resolved types and
// created [DartType] objects.
return internalError(node, "TypeVariable");
}

Powered by Google App Engine
This is Rietveld 408576698