proc test(x: cstring) = echo cast[int](x) var str: string = nil test(nil) # output 0 -> correct test(str) # output 8 ??
I think this should be a bug. I use "Nim Compiler Version 0.15.2 (2016-10-23) [Windows: i386]"
proc test(x: cstring) = echo cast[int](x) var str: string = nil test(nil) # output 0 -> correct test(str) # output 8 ??
I think this should be a bug. I use "Nim Compiler Version 0.15.2 (2016-10-23) [Windows: i386]"