From a88bce61063955e16e1bb8a65667ea0ec0571fa6 Mon Sep 17 00:00:00 2001 From: metagn Date: Tue, 25 Jun 2024 16:49:43 +0300 Subject: [PATCH] adapt semOpAux to opt-in symchoices (#23750) fixes #23749, refs #22716 `semIndirectOp` is used here because of the callback expressions, in this case `db.getProc(...)`, and `semIndirectOp` calls `semOpAux` to type its arguments before overloading starts. Hence it can opt in to symchoices since overloading will resolve them. (cherry picked from commit 948fc29bb20018437678e7c11019f1f2455c3a72) --- compiler/semexprs.nim | 2 +- tests/lookups/t23749.nim | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/lookups/t23749.nim diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 87b0aa61a5104..6612b5b219746 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -554,7 +554,7 @@ proc semIs(c: PContext, n: PNode, flags: TExprFlags): PNode = result = isOpImpl(c, n, flags) proc semOpAux(c: PContext, n: PNode) = - const flags = {efDetermineType} + const flags = {efDetermineType, efAllowSymChoice} for i in 1..