Fix InitLiteralComponentInstruction.getRhs() for key-value pairs

Key-value pairs are now expressions, but only the value is really written.
This commit is contained in:
Owen Mansel-Chan
2026-07-10 15:06:15 +01:00
parent a3b3381226
commit 45ef41361a

View File

@@ -551,7 +551,8 @@ module IR {
Instruction getBase() { result = evalExprInstruction(lit) }
override Instruction getRhs() {
result = evalExprInstruction(elt) or
not elt instanceof KeyValueExpr and result = evalExprInstruction(elt)
or
result = evalExprInstruction(elt.(KeyValueExpr).getValue())
}