Skip to content

Fix #9886: Disallow by-name trait parameters #10324

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
Nov 16, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 15, 2020

This is at best a partial fix. We disallow by-name trait parameters as an implementation restriction. It's better than crashing.

I tried for two days to make it work but gave up in the end. By-name parameters and traits are both very challenging to implement and their feature interaction in the various transformation stages is substantial. I will probably not go back to try to fix it again. If somebody wants to have a go, I can push the branch of my work so far.

@smarter
Copy link
Member

smarter commented Nov 15, 2020

I can push the branch of my work so far.

That could be useful for future reference even if we don't pick it up now.

@odersky
Copy link
Contributor Author

odersky commented Nov 15, 2020

I made #10326 to record the status where it got abandoned.

@smarter smarter merged commit eb92d6b into scala:master Nov 16, 2020
@smarter smarter deleted the workaround-$9886 branch November 16, 2020 13:30
@regiskuckaertz
Copy link

Hi - Sad face emoji. I had no idea this was so difficult. For the record, I have documented a few reasons why this is a desired feature here, as I feel you have made a lot of efforts to turn Scala into a language with first-class support for type classes. I hope someone revisits the idea one day.

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.

4 participants