-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Nil.type
widens to Nil$
#4987
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
Don't think so. Type inference usually widen singleton types but shouldn't do that for objects so it's probably a missing condition |
Fix #4987: Avoid widening instantiations to module classes
This is still happening. It seems that when we widen |
Yes, but type inference no longer does that widening, so what's the issue? |
|
also, the code in the example compiles, so perhaps a new issue should be opened? |
Yes, sure, widening Nil.type gives Nil$. What else did we expect? |
fails with
the last case inferes the type
scala.collection.immutable.Nil$
instead ofcollection.immutable.Nil.type
for the type parameter of the implicit classLiftExprOps
.This can be seen after typer
This code does compile on Scala 2.
The text was updated successfully, but these errors were encountered: