38a3b2153c
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 <paulberry@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com>