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

Unified Diff: pkg/analyzer/test/src/summary/summary_test.dart

Issue 1540533002: Fix for typedef-typed field formal parameter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/analyzer/lib/src/summary/summarize_elements.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_test.dart
diff --git a/pkg/analyzer/test/src/summary/summary_test.dart b/pkg/analyzer/test/src/summary/summary_test.dart
index a658d2b796d0d3a44e812ccd5edebceede662ea9..2fe16fa78ab643b1c07b4e2451e2da36705e107b 100644
--- a/pkg/analyzer/test/src/summary/summary_test.dart
+++ b/pkg/analyzer/test/src/summary/summary_test.dart
@@ -492,7 +492,8 @@ abstract class SummaryTest {
UnlinkedTypeRef serializeTypeText(String text,
{String otherDeclarations: '', bool allowErrors: false}) {
return serializeVariableText('$otherDeclarations\n$text v;',
- allowErrors: allowErrors).type;
+ allowErrors: allowErrors)
+ .type;
}
/**
@@ -901,7 +902,7 @@ class E {}
checkDynamicTypeRef(parameter.type);
}
- test_constructor_initializing_formal_function_typed_no_prameters() {
+ test_constructor_initializing_formal_function_typed_no_parameters() {
UnlinkedExecutable executable = findExecutable('',
executables: serializeClassText('class C { C(this.x()); final x; }')
.executables);
@@ -909,7 +910,7 @@ class E {}
expect(parameter.parameters, isEmpty);
}
- test_constructor_initializing_formal_function_typed_prameter() {
+ test_constructor_initializing_formal_function_typed_parameter() {
UnlinkedExecutable executable = findExecutable('',
executables: serializeClassText('class C { C(this.x(a)); final x; }')
.executables);
@@ -917,7 +918,7 @@ class E {}
expect(parameter.parameters, hasLength(1));
}
- test_constructor_initializing_formal_function_typed_prameter_order() {
+ test_constructor_initializing_formal_function_typed_parameter_order() {
UnlinkedExecutable executable = findExecutable('',
executables: serializeClassText('class C { C(this.x(a, b)); final x; }')
.executables);
@@ -980,6 +981,15 @@ class E {}
expect(parameter.kind, UnlinkedParamKind.required);
}
+ test_constructor_initializing_formal_typedef() {
+ UnlinkedExecutable executable = findExecutable('',
+ executables: serializeClassText(
+ 'typedef F<T>(T x); class C<X> { C(this.f); F<X> f; }')
+ .executables);
+ UnlinkedParam parameter = executable.parameters[0];
+ expect(parameter.parameters, hasLength(1));
+ }
+
test_constructor_named() {
UnlinkedExecutable executable = findExecutable('foo',
executables: serializeClassText('class C { C.foo(); }').executables);
@@ -1347,7 +1357,8 @@ typedef F();
test_executable_operator_index_set() {
UnlinkedExecutable executable = serializeClassText(
- 'class C { void operator[]=(int i, bool v) => null; }').executables[0];
+ 'class C { void operator[]=(int i, bool v) => null; }')
+ .executables[0];
expect(executable.kind, UnlinkedExecutableKind.functionOrMethod);
expect(executable.name, '[]=');
expect(executable.hasImplicitReturnType, false);
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698