Closed
Description
Compiler version
3.3.0
Minimized code
class X extends scala.reflect.Selectable:
val `+` = "1"
val x = X()
This one is not working:
x.selectDynamic("+")
Caused by: java.lang.NoSuchMethodException: Playground$X.+()
But this one works:
x.selectDynamic("$plus")
Expectation
This one works
x.selectDynamic("+")
Also I wonder is there a way of encoding given name by hand?
As I understood this blocks scalamock
migration to Scala 3, since MethodSymbol#name
returned encoded name, while Symbol#name
gives raw name, so I can't use reflection to get a field, I need to encode it somehow.