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

Do not add self-invoke evidence in parser #9577

Merged
merged 1 commit into from
Apr 20, 2021
Merged

Conversation

som-snytt
Copy link
Contributor

The RHS of an auxiliary constructor should have
implicit args supplied by typer as usual,
not using current args in parser, which could
only work if all alternatives of the overloaded
constructor have the same implicit parameters.

Fixes scala/bug#12233

The RHS of an auxiliary constructor should have
implicit args supplied by typer as usual,
not using current args in parser, which could
only work if all alternatives of the overloaded
constructor have the same implicit parameters.
@scala-jenkins scala-jenkins added this to the 2.13.6 milestone Apr 16, 2021
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

A nice and simple change. But is that parser code really adding nothing? Holding back on approving on that doubt...

@som-snytt
Copy link
Contributor Author

When the restriction against mixing context bounds and implicits was lifted pre-2.10, this bit should have been removed, modulo other restrictions. I lost patience looking for when that happened. Presumably the original restriction was enforced for a reason.

Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

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

Implicits for context bounds are added to all secondary constructors? I didn't know. Where's that in the spec?

@som-snytt
Copy link
Contributor Author

@lrytz Seth asked on the ticket, I will amend the comment so you don't have to skip the joke part. scala/bug#12233 (comment)

@lrytz lrytz merged commit d23bf26 into scala:2.13.x Apr 20, 2021
@lrytz
Copy link
Member

lrytz commented Apr 20, 2021

Thanks!

@som-snytt som-snytt deleted the issue/12233 branch April 20, 2021 21:20
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.

Mysterious constructor overload starring a type class
4 participants