-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: Check if a PolyFunction TypeTree has no ByName parameters #21671
Conversation
I see that there is already -- Error: test.scala:1:8 -------------------------------------------------------
1 |def k: [A] => (=> A) => A = // error
| ^^^^^^^^^^^^^^^^^
|Implementation restriction: PolyFunction apply must have exactly one parameter list and optionally type arguments. No by-name nor varags are allowed.
1 error found |
Good idea, less code is always better. I'm not sure about removing the assertion entirely. These types of assertions are pretty useful so that when something crashes, the error is thrown pretty early and not in an unrelated phase. Maybe just the byname and varargs part? |
Hmmm, actually it doesn't work for me. It compiles without any errors by default and crashed after some later phase with |
Strange, have we tried the same change?
|
Oooh, actually nevermind. It works, but the |
92bac25
to
60e957c
Compare
closes #21652