You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ExtractSemanticDB, we index the symbols of refinements in a depth first way (type A of b) (because symbols are not attached to the b.A (it only has Name), and then look up the symbol).
However, in the example above, when we try to generate semanticdb symbol, b.A hasn't yet have corresponding symbol in the symbol table. So we fail to retrieve the symbol for b.A.
Possible solutions
When we encounter the name symbol which doesn't have the corresponding symbol in the symbol table, generate a fake symbol, and somehow treat it as an alias of the "real symbol" (in this case, the symbol of type A (local0)).
As dotty Namer does, index all the symbols to the symbol table first, and then traverse tree again.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
3.1.1 (#14608)
Minimized code
Output
sbt> scala3-compiler-bootstrapped/test:runMain dotty.tools.dotc.semanticdb.updateExpect
There's no symbol occurrence for
b.A
on the first line.see: https://github.com/lampepfl/dotty/blob/ba24fe179c87d1a7a702914aab37e6dd822172c3/tests/semanticdb/expect/i5854.expect.scala
Expectation
In
ExtractSemanticDB
, we index the symbols of refinements in a depth first way (type A
ofb
) (because symbols are not attached to theb.A
(it only hasName
), and then look up the symbol).However, in the example above, when we try to generate semanticdb symbol,
b.A
hasn't yet have corresponding symbol in the symbol table. So we fail to retrieve the symbol forb.A
.Possible solutions
type A
(local0)).The text was updated successfully, but these errors were encountered: