From f4cd77c3189478e2d807407e3b223fbc3131f0cc Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 6 May 2026 22:48:37 +0800 Subject: [PATCH] fixes --- compiler/sem.nim | 3 ++- tests/whenstmt/twhen.nim | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/compiler/sem.nim b/compiler/sem.nim index 9f116dc31a..5ca7a2871d 100644 --- a/compiler/sem.nim +++ b/compiler/sem.nim @@ -459,9 +459,10 @@ proc normalizeTypedescMacroResult(c: PContext, n: PNode): PNode = if result.kind == nkStmtList: result.transitionSonsKind(nkStmtListType) + const maxTypedescMacroNormalizationPasses = 32 # Resolve surviving compile-time branches so later passes don't walk # unevaluated type AST for a typedesc expression. - while true: + for _ in 0..