| Index: pkg/analyzer/test/src/summary/summary_common.dart
|
| diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
|
| index 23571cc07865ad7a14ea4c7f3e335be1ca7a6a6b..794600cfdafbabe630b6451242b053bb2b65481a 100644
|
| --- a/pkg/analyzer/test/src/summary/summary_common.dart
|
| +++ b/pkg/analyzer/test/src/summary/summary_common.dart
|
| @@ -7692,6 +7692,44 @@ var v = h((y) {});
|
| checkReferenceIndex(linkedReference.containingReference, null, null, 'D');
|
| }
|
|
|
| + test_inferred_type_refers_to_nested_function_typed_param_of_typedef() {
|
| + if (!strongMode || skipFullyLinkedData) {
|
| + return;
|
| + }
|
| + UnlinkedVariable v = serializeVariableText('''
|
| +f(void g(int x, void h())) => null;
|
| +var v = f((x, y) {});
|
| +''');
|
| + expect(v.initializer.localFunctions, hasLength(1));
|
| + UnlinkedExecutable closure = v.initializer.localFunctions[0];
|
| + expect(closure.parameters, hasLength(2));
|
| + UnlinkedParam y = closure.parameters[1];
|
| + expect(y.name, 'y');
|
| + EntityRef typeRef = getTypeRefForSlot(y.inferredTypeSlot);
|
| + checkLinkedTypeRef(typeRef, null, null, 'f',
|
| + expectedKind: ReferenceKind.topLevelFunction);
|
| + expect(typeRef.implicitFunctionTypeIndices, [0, 1]);
|
| + }
|
| +
|
| + test_inferred_type_refers_to_nested_function_typed_param_of_typedef_named() {
|
| + if (!strongMode || skipFullyLinkedData) {
|
| + return;
|
| + }
|
| + UnlinkedVariable v = serializeVariableText('''
|
| +f({void g(int x, void h())}) => null;
|
| +var v = f(g: (x, y) {});
|
| +''');
|
| + expect(v.initializer.localFunctions, hasLength(1));
|
| + UnlinkedExecutable closure = v.initializer.localFunctions[0];
|
| + expect(closure.parameters, hasLength(2));
|
| + UnlinkedParam y = closure.parameters[1];
|
| + expect(y.name, 'y');
|
| + EntityRef typeRef = getTypeRefForSlot(y.inferredTypeSlot);
|
| + checkLinkedTypeRef(typeRef, null, null, 'f',
|
| + expectedKind: ReferenceKind.topLevelFunction);
|
| + expect(typeRef.implicitFunctionTypeIndices, [0, 1]);
|
| + }
|
| +
|
| test_inferred_type_refers_to_setter_function_typed_parameter_type() {
|
| if (!strongMode || skipFullyLinkedData) {
|
| return;
|
|
|