Using the NimNode type, either directly (e.g., as the type of a variable) or indirectly (e.g., by calling a procedure that returns a NimNode), in a run-time context crashes the compiler when building with --gc:arc or --gc:orc.
Example
# top-level code
var x: NimNode
Actual Output
compiler crashes with a segmentation fault
Expected Output
Error: cannot use `NimNode` in a non-compile-time-only context
Possible Solution
sem needs to report an error when a "triggers compile-time" type (such as NimNode) is used in a context that's not compile-time only.
Using the
NimNode
type, either directly (e.g., as the type of a variable) or indirectly (e.g., by calling a procedure that returns aNimNode
), in a run-time context crashes the compiler when building with--gc:arc
or--gc:orc
.Example
Actual Output
Expected Output
Possible Solution
sem
needs to report an error when a "triggers compile-time" type (such asNimNode
) is used in a context that's not compile-time only.