Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dart format with --enable-experiment=variance removes variance annotations #1510

Open
plammens opened this issue Aug 1, 2024 · 0 comments
Open
Labels

Comments

@plammens
Copy link

plammens commented Aug 1, 2024

Hit a bug in the formatter with dart format --enable-experiment=variance file.dart.
The formatter produced unexpected output. Input was:

class Consumer<in T> {
  void consume(T value) {
    print("Consumed: $value");
  }
}

Which formatted to:

class Consumer<T> {
  void consume(T value) {
    print("Consumed: $value");
  }
}

(The type parameter variance annotation was removed.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants