From 825a0e7df40100d92e87fc421a135a84b94f818f Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 2 Aug 2023 17:00:34 +0800 Subject: fixes #22362; Compiler crashes with staticBoundsCheck on (#22363) --- tests/pragmas/tpush.nim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/pragmas/tpush.nim') diff --git a/tests/pragmas/tpush.nim b/tests/pragmas/tpush.nim index f2779ea70..6d7eade91 100644 --- a/tests/pragmas/tpush.nim +++ b/tests/pragmas/tpush.nim @@ -1,3 +1,7 @@ +discard """ + targets: "c js" +""" + # test the new pragmas {.push warnings: off, hints: off.} @@ -25,3 +29,12 @@ proc foo(x: string, y: int, res: int) = foo("", 0, 48) foo("abc", 40, 51) + +# bug #22362 +{.push staticBoundChecks: on.} +proc main(): void = + {.pop.} + discard + {.push staticBoundChecks: on.} + +main() -- cgit 1.4.1-2-gfad0