Files
Nim/tests/vm
metagn 3a180df0d8 fix inTypeofContext leaking after compiles raises exception [backport:2.0] (#24152)
fixes #24150, refs #22022

An exception is raised in the `semExprWithType` call, which means `dec
c.inTypeofContext` is never called, but `compiles` allows compilation to
continue. This means `c.inTypeofContext` is left perpetually nonzero,
which prevents `compileTime` evaluation for the rest of the program.

To fix this, `defer:` is used for the `dec c.inTypeofContext` call, as
is done for
[`instCounter`](d51d88700b/compiler/seminst.nim (L374))
in other parts of the compiler.

(cherry picked from commit a1777200c1)
2024-09-28 08:18:04 +02:00
..
2018-08-13 13:02:52 +02:00
2017-07-25 09:28:23 +02:00
2019-02-01 12:12:10 +01:00
2018-08-13 13:02:52 +02:00
2016-08-23 01:10:34 +02:00
2017-02-05 08:51:43 +01:00
2019-09-28 19:50:20 +02:00
2019-08-02 22:59:04 +01:00
2019-05-21 21:31:40 +02:00
2018-12-11 21:23:22 +01:00
2016-10-09 18:02:48 +02:00
2018-06-26 21:25:27 +02:00
2018-10-27 14:10:05 +01:00
2018-08-13 23:16:03 +02:00
2018-11-23 11:58:28 +01:00
2020-12-28 14:13:21 +01:00
2020-11-05 14:00:08 +01:00
2020-12-28 14:13:21 +01:00
2017-07-25 09:28:23 +02:00
2014-03-16 20:42:49 +02:00