| Index: packages/dart_style/lib/src/line_splitting/line_splitter.dart
|
| diff --git a/packages/dart_style/lib/src/line_splitting/line_splitter.dart b/packages/dart_style/lib/src/line_splitting/line_splitter.dart
|
| index f562ca40dc699dc45f96e404f1b4ae7c2b66d207..420c509fe381fe06e9ebdb49ab09a2440cf80022 100644
|
| --- a/packages/dart_style/lib/src/line_splitting/line_splitter.dart
|
| +++ b/packages/dart_style/lib/src/line_splitting/line_splitter.dart
|
| @@ -130,10 +130,10 @@ class LineSplitter {
|
| int firstLineIndent,
|
| {bool flushLeft: false})
|
| : chunks = chunks,
|
| - // Collect the set of soft rules that we need to select values for.
|
| + // Collect the set of rules that we need to select values for.
|
| rules = chunks
|
| .map((chunk) => chunk.rule)
|
| - .where((rule) => rule != null && rule is! HardSplitRule)
|
| + .where((rule) => rule != null)
|
| .toSet()
|
| .toList(growable: false),
|
| blockIndentation = blockIndentation,
|
| @@ -145,6 +145,12 @@ class LineSplitter {
|
| for (var i = 0; i < rules.length; i++) {
|
| rules[i].index = i;
|
| }
|
| +
|
| + // Now that every used rule has an index, tell the rules to discard any
|
| + // constraints on unindexed rules.
|
| + for (var rule in rules) {
|
| + rule.forgetUnusedRules();
|
| + }
|
| }
|
|
|
| /// Determine the best way to split the chunks into lines that fit in the
|
|
|