Open disruptek opened 6 months ago
As a temporary workaround, you can move .push
outside of the procedure, like so:
{.push objChecks: off.}
proc example() =
...
{.pop.}
The long-standing problem is that .push
and .pop
only apply to procedures, which also affects all the other check pragmas (e.g., boundChecks
, rangeChecks
, etc.). It should also be possible to use objChecks: off
directly on the procedure, but that's currently not implemented.
Regarding fixing this, mirgen
already supports intra-procedure check enabling/disabling, what's missing is processing the .push
and .pop
pragmas and implementing the option stack semantics. I'm busy with other things for the next week or so, but I could work on this afterwards.
Please don't sweat it; plenty of workarounds.
Specification
The
objChecks
boolean flag toggles object conversion checks. It may be disabled via configuration or by using apush
pragma.Example
Actual Output
Expected Output
Additional Information