-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enum expansion does not work for singleton type parameters #3935
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
If we can convince ourselves that it won't lead to unsoundness, this could be solved by adding a cast: def apply[S, T](y: T): Foo3[y.type] = (new Foo3.Bar[S, T](y)).asInstanceOf[Foo3[y.type]] |
this will be fixed when we have the precise |
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 4, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 4, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 4, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 4, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 29, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 30, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 30, 2020
bishabosha
added a commit
to dotty-staging/dotty
that referenced
this issue
Sep 30, 2020
fixed by #9932 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following produces a type error:
See discussion in #3903 for details. The problem is that the expansion of
Bar
'sapply
method does not typecheck:A proper fix would require #3920 to be addressed. We could try to prevent code like this by restricting enum case parents, but maybe it's simpler to just accept that the expansion need not
always be type correct.
The text was updated successfully, but these errors were encountered: