mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +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.
(cherry picked from commit 5aaba213d4)
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 == ""
|