Skip to content

Commit e06d0f3

Browse files
natebiggsCommit Queue
authored and
Commit Queue
committed
[dart2js] Update DartFormatter invocations to pass language version.
Bug: #56686 Change-Id: I3f578d29e125426c02eac564ca6baff9fb7d8919 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384402 Reviewed-by: Bob Nystrom <[email protected]> Auto-Submit: Nate Biggs <[email protected]> Commit-Queue: Bob Nystrom <[email protected]>
1 parent aa08d06 commit e06d0f3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pkg/compiler/test/tool/graph_isomorphizer/graph_isomorphizer_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ void unorderedListEquals(List<String> expected, List<String> actual) {
4242
void verifyGeneratedFile(
4343
String filename, StringBuffer contents, Map<String, String> expectations) {
4444
Expect.stringEquals(
45-
DartFormatter().format(contents.toString()), expectations[filename]!);
45+
DartFormatter(languageVersion: DartFormatter.latestLanguageVersion)
46+
.format(contents.toString()),
47+
expectations[filename]!);
4648
}
4749

4850
GraphIsomorphizer generateFiles(List<String> graphFileLines,

pkg/compiler/tool/graph_isomorphizer.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ class GraphIsomorphizer {
458458
var file = File(this.outDirectory + '/' + filename);
459459
file.createSync(recursive: true);
460460
var sink = file.openWrite();
461-
sink.write(DartFormatter().format(contents.toString()));
461+
sink.write(
462+
DartFormatter(languageVersion: DartFormatter.latestLanguageVersion)
463+
.format(contents.toString()));
462464
sink.close();
463465
}
464466

0 commit comments

Comments
 (0)