mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
closes #24875 Refc gives `0 (invalid data!)`, but since enum `$` procs on arc are generated during enum declarations we might not have access to string concatenation and integer `$`, so it generates a static string. Just chose an empty string for this.
10 lines
102 B
Nim
10 lines
102 B
Nim
# issue #24875
|
|
|
|
type
|
|
MyEnum = enum
|
|
One = 1
|
|
|
|
var x = cast[MyEnum](0)
|
|
let s = $x
|
|
doAssert s == ""
|