diff --git a/go/ql/lib/semmle/go/controlflow/IR.qll b/go/ql/lib/semmle/go/controlflow/IR.qll index a2eb3d89bd8..f4f7c4939d5 100644 --- a/go/ql/lib/semmle/go/controlflow/IR.qll +++ b/go/ql/lib/semmle/go/controlflow/IR.qll @@ -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()) }