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
/** The implementations of `selectDynamic` and `applyDynamic` in `scala.reflect.SelectDynamic` have no information about the expected return type of a value/method which was declared in the refinement,
221
+
* only the JVM type after erasure can be obtained through reflection, e.g.
222
+
*
223
+
* class Foo(val i: Int) extends AnyVal
224
+
* class Reflective extends reflect.Selectable
225
+
* val reflective = new Reflective {
226
+
* def foo = Foo(1) // Foo at compile time, java.lang.Integer in reflection
227
+
* }
228
+
*
229
+
* Because of that reflective access cannot be implemented properly in `scala.reflect.SelectDynamic` itself
230
+
* because it's not known there if the value should be wrapped in a value class constructor call or not.
231
+
* Hence the logic of wrapping is performed here, relying on the fact that the implementations of `selectDynamic` and `applyDynamic` in `scala.reflect.SelectDynamic` are final.
0 commit comments