Closed arezaii closed 2 weeks ago
I added a comment about performance and noted that if we were not changing the defaultsPolicy
from USE_DEFAULTS_OTHER_FIELDS
to IGNORE_DEFAULTS
, the resolveFieldDecl
query would likely use the cached result that it created while resolving the class's field declarations rather than recomputing.
Updates the resolution of symbols in the body of a method to properly resolve the type of fields that are part of a multi-decl.
The following reproducer would not resolve properly with
--dyno
:because the type of
a
, although previously identified to beint
, would beunknown
when evaluating the return type ofgetA()
and makex
erroneous.This was happening because in this specific case we were not normalizing the symbol for the possibility it was an element of a multi-decl or tupledecl or other type of decl that is more like a container for other decls. We were attempting to resolve the type of
a
without the information about its multi-decl parent.TESTING:
--dyno
only produces errors inconvert-uast
[reviewed by @DanilaFe - thank you!]