Skip to content

Change enum scheme to correspond to new description in issue #1970 #2460

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 4 commits into from
May 22, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 17, 2017

Always demand that type parameters of cases are given explicitly.

odersky added 4 commits May 17, 2017 16:33
Always demand that type parameters of cases are given explicitly.
(unrelated to PR, but it's too much hassle to open a separate one to
get this in)
@odersky odersky requested a review from sjrd May 18, 2017 07:09
@odersky
Copy link
Contributor Author

odersky commented May 18, 2017

Only first commit needs to be reviewed.

@propensive
Copy link
Contributor

Was the motivation that the "parameter-inference" was just too magic, otherwise?

@odersky
Copy link
Contributor Author

odersky commented May 18, 2017

Too much magic, and not consistent with design principles elsewhere, yes.

@sjrd
Copy link
Member

sjrd commented May 19, 2017

The changes look good. I think it would be good to add tests for things that were previously impossible/very awkward. For example:

enum E[+T] {
  case A[T, U](t: T, u: U) extends E[T] // is the explicit extends necessary here?
  case B
}

and things like that.

@odersky
Copy link
Contributor Author

odersky commented May 22, 2017

@sjrd I'll roll in the tests in a future PR. Have to merge now to write the docs.

@odersky odersky merged commit 5efbe52 into scala:master May 22, 2017
@allanrenucci allanrenucci deleted the change-enum branch December 14, 2017 16:58
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.

3 participants