Description
The documentation at https://github.com/lampepfl/dotty/blob/master/src/dotty/tools/dotc/TypeErasure.scala#L133 says:
* - For all other symbols : the semi-erasure of their types, with
* isJava, isConstructor set according to symbol.
But this is not actually the case, in the definition of this method there is a call to eraseInfo
which calls scalaErasureFn.eraseInfo
so isJava
, isConstructor
and isSemi
are not set correctly. Note that replacing eraseInfo
by erasure.eraseInfo
is not enough to solve the problem since the definition of eraseInfo
in the class TypeErasure
calls erasure
which calls scalaErasureFn
again.
@odersky: What is the expect behavior here? Is the documentation correct or the code? In any case, I think we could make things clearer by avoiding having methods with the same name but different behaviors in the class TypeErasure
and the object TypeErasure
.