Open
Description
Nim Version
2.2.0
Description
When cloning nclap, going to branch unnamed_arguments
, commit 2d94607a3366656dfe1a64461dc4e1926b1b6587
and running nimble test
, I get a Illegal storage access
on an object variant because of a field that is not present in this variant
Current Output
Traceback (most recent call last)
nclap/tests/test1.nim(363) test1
nclap/src/nclap/parser.nim(606) parse
nclap/src/nclap/parser.nim(441) parseArgs
/home/user/.choosenim/toolchains/nim-2.2.0/lib/system.nim(1678) getFirstUnregisteredUnnamedArgument
/home/user/.choosenim/toolchains/nim-2.2.0/lib/system/alloc.nim(1147) alloc
/home/user/.choosenim/toolchains/nim-2.2.0/lib/system/alloc.nim(931) rawAlloc
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Error: execution of an external program failed: 'nclap/tests/test1'
Tip: 2 messages have been suppressed, use --verbose to show them.
tools.nim(36) doCmd
Error: Execution failed with exit code 1
... Command: /home/user/.nimble/bin/nim c --noNimblePath -d:NimblePkgVersion=0.1.39 --hints:off -r --path:. nclap/tests/test1
Expected Output
Unhandled exception: field 'ua_name' is not accessible for type 'Argument' using 'kind = Flag' [FieldDefect]
Known Workarounds
Compiling with --mm:refc
Additional Information
No response