-
Notifications
You must be signed in to change notification settings - Fork 1.1k
valueOf does not work in inlined code #6241
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
object Test extends App {
inline def v[T] = valueOf[T]
println(v[String])
} leads to
The culprit is that With the fix we get:
That's still unsatisfactory. The underlying problem is that |
Here's a workaround: inline def valueOf2 = implicit match {
case ev: ValueOf[T] => ev.value
} Question: Should |
@odersky That looks OK to me ... I'm happy to test and PR that change. |
No problem with that change, though it might be better to roll it in to #6218 so that a neg test can be added. |
@milessabin OK, please go ahead! |
@odersky as a separate PR? |
No description provided.
The text was updated successfully, but these errors were encountered: