-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Applications of abstract higher-kinded types to wildcard arguments aren't rejected #4382
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
Labels
Comments
See #4376 for an example that crashes the compiler because we assume that hk types do not have wildcard arguments. |
odersky
added a commit
that referenced
this issue
May 1, 2018
Fix #4382: Disallow wildcard arguments for higher-kinded types
We still get the same crash from
which has no syntax errors. If you rename That's minimized from #4452's and #4389:
|
More precisely, the full stack trace is a bit different later, but still the same idea:
|
6 tasks
EDIT: moved comment to #4376. |
OlivierBlanvillain
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 19, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Carved out of #4375. The following code compiles, while I expect all the errors described—they're necessary if we want to ensure people can't write existentials (and otherwise, not sure what the current check is for). Such an error is useful for people who might not realize their types mean something else now.
The check for unreducibility seems simply incomplete:
contrast with
To demonstrate this is a problem, let's use a trait instead:
Then at least the types are approximates without crashes (here):
The text was updated successfully, but these errors were encountered: