Caleb B
11/19/2025, 7:41 PMthis@R|/MyClass|.R|/MyClass.bar| = R|<local>/value|?
I'm assuming it's through buildVariableAssignment, but I can't figure out what builders to wire into the LValue and RValue.Caleb B
11/19/2025, 7:42 PMpublic final class MyClass : R|kotlin/Any| {
public constructor(): R|MyClass| {
super<R|kotlin/Any|>()
}
public final var bar: R|kotlin/String| = String(MADBAGIC)
public get(): R|kotlin/String|
public set(value: R|kotlin/String|): R|kotlin/Unit|
public final fun setBar(value: R|kotlin/String|): R|kotlin/Unit| {
this@R|/MyClass|.R|/MyClass.bar| = R|<local>/value|
}
}
I'm trying to build the body of that setBar function.Caleb B
11/19/2025, 7:43 PMbuildPropertyAccessExpression seems like it's the right one, maybe? But the usage is all over the place, seemingly encompassing not just class-bound properties but also local variable access, and I don't know the implications of buildResolvedNamedReference that a lot of the usages use.Javier
11/19/2025, 7:51 PMCaleb B
11/19/2025, 7:56 PMJavier
11/19/2025, 7:58 PMCaleb B
11/19/2025, 8:01 PMCaleb B
11/19/2025, 8:14 PMbuildResolvedNamedReference that's doing it...Javier
11/19/2025, 8:15 PMIf I delay it to IR, I need a metadata annotation to get the raw name of the property I'm trying to access, instead of being able to access it directlyNot sure why, on IR you can even find all files and find any declaration by name if you want
Caleb B
11/19/2025, 8:16 PMsetBar method for a property bar. (It's a fallback for general setter overloading.)
The problem is that both bar and Bar will create the method setBar, and if they both exist, it'll cause all kinds of conflicts if it's resolved by name only. Plus considering how many other locale things are in the mix, I want to avoid referencing by name at all if possible.Caleb B
11/19/2025, 8:22 PMset-{name} in general for the overloaded setters