Skip to content

Change error message when enumeration type param is invariant #11224

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

Merged
merged 1 commit into from
Jan 27, 2021

Conversation

mpilquist
Copy link
Contributor

Minor thing I noticed when working with enumerations:

scala> enum Lst[A]:
     |   case Nil
     |   case Cons(head: A, tail: Lst[A])
     |
2 |  case Nil
  |  ^^^^^^^^
  |  cannot determine type argument for enum parent class Lst,
  |  type parameter type A is non variant

This is the only occurrence of "non variant" in any compiler error messages. PR changes this to "invariant".

@odersky odersky merged commit 4a6ec60 into scala:master Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants