You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove tests of invalid import syntax.
The language specifies that import configuration URIs must appear before
any import prefix, like:
```dart
import 'foo.dart' if (cond) 'bar.dart' as prefix;
```
If a user wrote them in the wrong order:
```dart
import 'foo.dart' as prefix if (cond) 'bar.dart';
```
Then the parser used to not report an error and would accept the code,
which would then be compiled successfully. Some users in the wild,
probably inadvertently, ended up relying on this. So I added support in
the formatter to handle it.
I also filed:
dart-lang/sdk#56641
That issue will be fixed soon:
dart-lang/sdk#61264
It's going to be a parse error to have the clauses in the wrong order.
These formatter tests are failing in the bleeding edge SDK. So now it's
time to remove the tests and support for the broken code.
(Note that the comment in the tests are backwards. Configuration before
prefix is the correct order. It's prefix before configuration that's
wrong.)
0 commit comments