var
str: string
for ch in str:
# whatever
gives the error message: Error: ambiguous call; both system.items(a: cstring) and system.items(a: openarray[T]) match for: (string)
But... when I tried to make a small test file to post here, it compiled without errors!
So my question is: is the "--gc:stack" implementation still just work-in-progress, or should I put in some more work to reproduce these symptoms and raise proper issues on Github?
PS: This problem is present on the latest nim version from Github, downloaded and compiled yesterday. My host system is an up-to-date x86_64 with Arch Linux, trying to cross-compile for --cpu:arm
Oops, I should have said that my project (a few thousand lines of nim code) already compiles without errors using --os:standalone and --gc:none.
It was only after changing to --gc:stack that I had to spend half an hour or so hacking my code around to compile successfully again.
Okay, if I manage to reproduce any of these in a simple test program, I will raise them on Github.
Thanks for the rapid response!
PROBLEM SOLVED! The garbage collector is innocent.
When using --os:standalone, you must provide a file panicoverride.nim. I wanted to prettify my output_message, so I imported another module (which contained the asserts etc.) in to panicoverride.
It seems that the panicoverride code is processed somewhere in the middle of compiling stdlib/system, so it's no surprise that parts of the system module itself have not been declared before that point.