diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-12-06 04:04:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 21:04:41 +0100 |
commit | d20b4d5168780b9c6a3bd2fde28b171cb7414c98 (patch) | |
tree | 10c1f7802870f27026a78729473439218c67f1f6 /tests/pragmas | |
parent | 202e21daba1424762cf330effb52220c6f1d5772 (diff) | |
download | Nim-d20b4d5168780b9c6a3bd2fde28b171cb7414c98.tar.gz |
fixes #23019; Regression from 2.0 to devel with raise an unlisted exc… (#23034)
…eption: Exception fixes #23019 I suppose `implicitPragmas` is called somewhere which converts `otherPragmas`.
Diffstat (limited to 'tests/pragmas')
-rw-r--r-- | tests/pragmas/tpush.nim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/pragmas/tpush.nim b/tests/pragmas/tpush.nim index 6a95f1ca0..8ebbfe3d3 100644 --- a/tests/pragmas/tpush.nim +++ b/tests/pragmas/tpush.nim @@ -77,3 +77,25 @@ block: # bug #22913 {.pop.} discard foo2() + +block: # bug #23019 + proc f(x: bool) + + proc a(x: int) = + if false: f(true) + + proc f(x: bool) = + if false: a(0) + + proc k(r: int|int) {.inline.} = # seems to require being generic and inline + if false: a(0) + + + # {.push tags: [].} + {.push raises: [].} + + {.push warning[ObservableStores]:off.} # can be any warning, off or on + let w = 0 + k(w) + {.pop.} + {.pop.} |