Open retronym opened 10 months ago
I looked a bit, tricky stuff :)
The comment about calling sym.initialize
in parseClass
brings up the idea to know type params before completing the ClassTypeCompleter
. That sounds like a valid cleanup (no need to call initialize
eagerly).
The issue here however is that PolyClass
still has the lazy type before that (ClassfileLoader
), so it would not help.
I don't have any other idea than your suggestion to complete classSym
before checking for type params, but that causes cycles (I tried narrowing it down to ClassfileLoader
s, but still).
So maybe we need to come from the other end, check where we run into an issue with the raw type and see if we can add cookJavaRawInfo
/ fullyInitializeSymbol
somewhere along the way.
🤷
Reproduction steps
Problem
Compilation should give the same result, irrespective of the order of initialization of symbols. In this case, that result should be successful.
Relevant comment from
ClassFileParser
ClassfileParser.sigToType::processClassType