Skip to content

Fix #3976: Fix Eq method for enums with higher-kinded parameters #3982

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 2 commits into from
Feb 12, 2018

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 11, 2018

No description provided.

def appliedRef(tycon: Tree, tparams: List[TypeDef] = constrTparams) =
appliedTypeTree(tycon, tparams map refOfDef)
def appliedRef(tycon: Tree, tparams: List[TypeDef] = constrTparams, widenHK: Boolean = false) = {
var targs = for (tparam <- tparams) yield {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var -> val

@@ -0,0 +1 @@
enum class Hoge[F[_]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a test with an M[_[_]] param, and perhaps some code that exercises the generated Eq implicits too to make sure it works as expected.

 - More extensive use cases
 - Defining enum cases with wrong kinds in extension clauses caused
   a crash in argDenot, which is fixed now.
@odersky odersky merged commit e2f72cd into scala:master Feb 12, 2018
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