-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Match type on Functions #13800
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
Comments
The example is not even syntactically correct. If I fix the syntax error for
Did the explanations not show up in your test? That could point to a problem in IntelliJ's setup. The explanations make sense. Functions are traits that can be inherited arbitrarily. In particular, it is possible that an object inherits function types with different arities at the same time. So the compiler is correct to reject this. |
@odersky IntelliJ's Idea indeed did hide the elaborate explanation that comes after Does
correspond to
in the compiler's note?
|
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
3.0.2
3.1.0 makes the Scala plugin for Idea think it needs Scala 2 syntax, where can I report this?
Minimized code
Output
Expectation
To run. Sadly with the uninformative error messages I can not say much more.
Changing the order in the match type changes which cases error, so I guess it's all matching to the first case.
The feature requests I'm referring to (that would avoid this snag) is lampepfl/dotty-feature-requests#246.
EDIT: Add
def
in code exampleThe text was updated successfully, but these errors were encountered: