From 094a29eb315b571924bb3b381eb25df8fb9c193c Mon Sep 17 00:00:00 2001 From: Bung Date: Mon, 28 Aug 2023 12:31:16 +0800 Subject: add test case for #19095 (#22566) --- tests/closure/t19095.nim | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/closure/t19095.nim diff --git a/tests/closure/t19095.nim b/tests/closure/t19095.nim new file mode 100644 index 000000000..880456e02 --- /dev/null +++ b/tests/closure/t19095.nim @@ -0,0 +1,35 @@ +discard """ + action: compile +""" + +block: + func inCheck() = + discard + + iterator iter(): int = + yield 0 + yield 0 + + func search() = + let inCheck = 0 + + for i in iter(): + + proc hello() = + inCheck() + + search() +block: + iterator iter(): int = + yield 0 + yield 0 + + func search() = + let lmrMoveCounter = 0 + + for i in iter(): + + proc hello() = + discard lmrMoveCounter + + search() -- cgit 1.4.1-2-gfad0 This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log blame commit diff stats
path: root/config/nim.cfg
blob: 5caf578d640b50542591ca3c2e2408158db30119 (plain) (tree)
1
2
3
4
5
6
7
8
9