File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
pkg/analysis_server/lib/src/services/correction/dart Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class SplitMultipleDeclarations extends ResolvedCorrectionProducer {
34
34
final hasMetadata = variableList.metadata.isNotEmpty;
35
35
36
36
final parent = variableList.parent;
37
+ // TODO(sstasi95): consider fields
37
38
final hasParentMetadata =
38
39
(parent is TopLevelVariableDeclaration ) && parent.metadata.isNotEmpty;
39
40
@@ -49,6 +50,10 @@ class SplitMultipleDeclarations extends ResolvedCorrectionProducer {
49
50
50
51
final entities = variableList.childEntities
51
52
.where ((e) => e is KeywordToken || e is NamedType );
53
+ if (entities.isEmpty) {
54
+ return ;
55
+ }
56
+
52
57
final entitiesRange = range.startEnd (entities.first, entities.last);
53
58
final keywordsAndType = utils.getRangeText (entitiesRange);
54
59
You can’t perform that action at this time.
0 commit comments