score:1

Accepted answer

the reason is pretty simple. universe has an implicit method named methodsymboltag (mixed in from the symbols trait) defined like this:

implicit val methodsymboltag: classtag[universe.methodsymbol]

the presence of a classtag[universe.methodsymbol] in scope allows the compiler to curcimvent erasure.

you can verify this by adding this import in your second code snippet:

import ru.methodsymboltag

Related Query

More Query from same tag