| Index: pkg/analyzer/test/src/task/dart_test.dart
|
| diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
|
| index 8b2bae5512988c865be34a2c9c0ec83df0b11018..078592132e5f31acc5a94d2a520f0d808399916b 100644
|
| --- a/pkg/analyzer/test/src/task/dart_test.dart
|
| +++ b/pkg/analyzer/test/src/task/dart_test.dart
|
| @@ -1859,6 +1859,33 @@ final d = 4;
|
| expect(
|
| dependencies, unorderedEquals([getTopLevelVariableElement(unit, 'd')]));
|
| }
|
| +
|
| + test_perform_topLevel_withoutSpaceAfterType() {
|
| + AnalysisTarget source = newSource(
|
| + '/test.dart',
|
| + '''
|
| +const List<int>a=[b, c];
|
| +const b = 1;
|
| +const c = 2;
|
| +''');
|
| + LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
|
| + computeResult(target, RESOLVED_UNIT5);
|
| + CompilationUnit unit = outputs[RESOLVED_UNIT5];
|
| + TopLevelVariableElement elementA = getTopLevelVariableElement(unit, 'a');
|
| + // compute
|
| + computeResult(elementA, PROPAGABLE_VARIABLE_DEPENDENCIES,
|
| + matcher: isComputePropagableVariableDependenciesTask);
|
| + // verify
|
| + expect(outputs, hasLength(1));
|
| + List<VariableElement> dependencies =
|
| + outputs[PROPAGABLE_VARIABLE_DEPENDENCIES];
|
| + expect(
|
| + dependencies,
|
| + unorderedEquals([
|
| + getTopLevelVariableElement(unit, 'b'),
|
| + getTopLevelVariableElement(unit, 'c')
|
| + ]));
|
| + }
|
| }
|
|
|
| @reflectiveTest
|
|
|