-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Type member selection on argument of type Nothing fails #11864
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
Minimized type Ev = { type Out }
inline def foo(ev: Ev): Option[ev.Out] = ???
def test: Unit = foo(???) The issue is that when we inline an This issue appeared with the erased given because we optimize it away early to |
This issue is the type selection version of issue #8612 |
|
An alternative might be to use the type of the parameter instead of a bottom type. |
It seems to me your original proposal to use type ascriptions is a good and principled solution. |
I agree, we should try to type ascribe in this case |
Compiler version
3.0.0-RC1 with
-Ykind-projector -Yerased-terms
Minimized code
Output
Expectation
It should compile.
The problem occurs due to the combination of
inline
anderased
because either of the following work as workarounds:inline
from.map
MapGuard
to not be erasedThe text was updated successfully, but these errors were encountered: