You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
Found: (t : T)
Required: Selectable
where: T is a type in method bar with bounds <: Structural
The following import might fix the problem:
import reflect.Selectable.reflectiveSelectable
However, I don't think there isn't any need for reflection here, since bar is inlined and the actual type of t will be known at the call site. Would it be possible to expand t.foo to just a normal method call instead of using reflection? I don't think it's a major change, but if it is, it would still be nice to have in a future version of Scala.
The text was updated successfully, but these errors were encountered:
I think it might be annoying if it is typed as if there exists a real foo method, but then at the call site where it is inlined there is no foo method and it has to be selected structurally, and now there has been no appropriate Selectable conversion supplied to fall back upon
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, this code does not immediately compile:
The error given is
Scastie that includes the import.
However, I don't think there isn't any need for reflection here, since
bar
is inlined and the actual type oft
will be known at the call site. Would it be possible to expandt.foo
to just a normal method call instead of using reflection? I don't think it's a major change, but if it is, it would still be nice to have in a future version of Scala.The text was updated successfully, but these errors were encountered: