Fix Annotation.refersToParamOf
to work with parameter references outside of Ident
or This
#22008
Labels
Annotation.refersToParamOf
to work with parameter references outside of Ident
or This
#22008
Currently,
Annotations.refersToParamOf
assumes that allTermParamRef
types will only appear as the (root) type ofIdent
orThis
trees:scala3/compiler/src/dotty/tools/dotc/core/Annotations.scala
Lines 75 to 82 in 912b6f2
This assumption can be invalidated, for example when trees are generated by macros.
See #22001 (comment) for prior discussion. I proposed two fixes there.
To do:
refersToParamOf
should visit the least possible number of trees and types.The text was updated successfully, but these errors were encountered: