How to debug Symbol completion/creation? #11893
-
I have a OR : I have a OR : I have a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
When a symbol is created, its |
Beta Was this translation helpful? Give feedback.
Symbol
s have hash codes that are stable between compiler runs. To find out what creates aSymbol
, first find out its hash code, then simply print a stack trace inSymbol
's constructor when the hash code matches. The stack trace will probably contain some new* methods in Symbols.scala.When a symbol is created, its
.info
is set to a lazy type. This lazy type will later be used to actually calculate the.info
for the symbol (seecomplete
anddoComplete
in SymbolLoader). One way to debug information about the completion of the symbol is to print information when the symbol with the correct hash code is being completed.