Open vovcacik opened 8 years ago
One more comment. It might be better to replace
if (type.hasErasedSupertypes())
type=(ClassType)type.tsym.type
with
if (type.supertype_field == null)
type=(ClassType)type.tsym.type
It should be true that type.hasErasedSupertypes() == (type.supertype_field == null)
but I am not absolutely sure about this.
If the
type
parameter incheckSuperTypes
is generic it will have erased supertype and thustype.supertype_field == null
. Luckily we can still access the non-erased type thrutsym
.Note that this problem affect generic types only if there is at least three or more in the inheritance chain. If there are only two generic classes, then only checkScopes is called and its not affected. Only checkSuperTypes is affected. I believe it boils down to that
checkScopes
is taking members fromJCIdent
and thecheckSuperTypes
fromClassType
object.