From fda8b6f193e2e229488f76f18089f01eb08272fb Mon Sep 17 00:00:00 2001 From: metagn Date: Tue, 13 Jun 2023 13:04:24 +0300 Subject: [PATCH] strictly typecheck expressions in bracketed `emit` (#22074) * strictly typecheck expressions in bracketed `emit` * use nim check in test --- compiler/pragmas.nim | 2 +- compiler/sem.nim | 1 + compiler/semdata.nim | 1 + tests/lookups/tambiguousemit.nim | 12 ++++++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/lookups/tambiguousemit.nim diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index b3ccaf2249..9e4a0052dd 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -629,7 +629,7 @@ proc pragmaEmit(c: PContext, n: PNode) = if n1.kind == nkBracket: var b = newNodeI(nkBracket, n1.info, n1.len) for i in 0..