Skip to content

Commit cebef3b

Browse files
committed
ClassSymbol#tree: don't forget to force the info
Otherwise the tree might not exist yet
1 parent 35cbf65 commit cebef3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,10 @@ object Symbols {
556556
type ThisName = TypeName
557557

558558
/** If this is a top-level class, and if `-Yretain-trees` is set, return the TypeDef tree
559-
* for this class, otherwise EmptyTree.
559+
* for this class, otherwise EmptyTree. This will force the info of the class.
560560
*/
561561
def tree(implicit ctx: Context): tpd.Tree /* tpd.TypeDef | tpd.EmptyTree */ = {
562+
denot.info
562563
// TODO: Consider storing this tree like we store lazy trees for inline functions
563564
if (unpickler != null && !denot.isAbsent) {
564565
assert(myTree.isEmpty)

0 commit comments

Comments
 (0)