Commit 38a3b21
Don't pass a null language version to DartFormatter().
The DartFormatter() constructor call in edit_format.dart is passing in
a language version, which is good. But it was passing a nullable
Version because of the default case. That works in dart_style 2.3.7
where the Version is optional but fails in 3.0.0 because the Version
is non-nullable there.
This fixes that by defaulting to the latest version. I'm not sure under
what conditions this can fail to find an effectiveLanguageVersion so I
don't know if the latest version is the right default. Let me know if
there's something better I should do here.
Change-Id: I76477e5df9dcf2a78176207cff92c20c7f08a17b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391840
Reviewed-by: Paul Berry <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
Auto-Submit: Bob Nystrom <[email protected]>1 parent 3e71d18 commit 38a3b21
1 file changed
+14
-7
lines changedLines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| |||
0 commit comments