Given a reference to a property (either as an `Fir...
# compiler
c
Given a reference to a property (either as an
FirPropertySymbol
or
FirNamedReference
), how do you get the class that "owns" said property? (The receiver if it's an extension, or the actual owning class if it's a standard property.) I have
R|<local>/inst|.R|/MyClass.bar|
, I just can't figure out how to go one level up to
R|<local>/inst|.R|/MyClass|
.
✅ 1
d
There is a dispatchRecieverType, which corresponds to the containing class.
y
An
FirNamedReference
might not be
resolved
though, so be careful! But if it is resolved then yes it'll have a dispatch receiver. Maybe there's some stuff you can do with
CallableId
as well.
c
Thanks!