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

Unified Diff: tests/compiler/dart2js/resolver_test.dart

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Remove obsolete named argument. Created 3 years, 12 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: tests/compiler/dart2js/resolver_test.dart
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index f49f8e5186595789bb8cc280cc5be9e6ce21f01b..477e023280f32b152ffacdf081dea13cfee17f98 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -148,8 +148,11 @@ Future testTypeVariables() {
VariableDefinitions definition = parseStatement(text);
visitor.visit(definition.type);
InterfaceType type = visitor.registry.mapping.getType(definition.type);
+ // TODO(floitsch): bad type here. Type is not necessarily a
+ // NominalTypeAnnotation.
+ NominalTypeAnnotation annotation = definition.type;
Expect.equals(
- definition.type.typeArguments.slowLength(), type.typeArguments.length);
+ annotation.typeArguments.slowLength(), type.typeArguments.length);
int index = 0;
for (DartType argument in type.typeArguments) {
Expect.equals(true, index < expectedElements.length);
@@ -699,7 +702,8 @@ Future testTopLevelFields() {
Expect.equals(ElementKind.FIELD, element.kind);
VariableDefinitions node =
element.variables.parseNode(element, compiler.parsingContext);
- Identifier typeName = node.type.typeName;
+ NominalTypeAnnotation annotation = node.type;
+ Identifier typeName = annotation.typeName;
Expect.equals(typeName.source, 'int');
compiler.parseScript("var b, c;");

Powered by Google App Engine
This is Rietveld 408576698