bugfix: reprEnum
This commit is contained in:
parent
7efe817ca3
commit
3af91064e5
2 changed files with 3 additions and 2 deletions
|
|
@ -50,6 +50,8 @@ proc reprChar(x: char): string {.compilerRtl.} =
|
||||||
add result, "\'"
|
add result, "\'"
|
||||||
|
|
||||||
proc reprEnum(e: int, typ: PNimType): string {.compilerRtl.} =
|
proc reprEnum(e: int, typ: PNimType): string {.compilerRtl.} =
|
||||||
|
# we read an 'int' but this may have been too large, so mask the other bits:
|
||||||
|
let e = e and (1 shl (typ.size*8)-1)
|
||||||
if ntfEnumHole notin typ.flags:
|
if ntfEnumHole notin typ.flags:
|
||||||
if e <% typ.node.len:
|
if e <% typ.node.len:
|
||||||
return $typ.node.sons[e].name
|
return $typ.node.sons[e].name
|
||||||
|
|
|
||||||
3
todo.txt
3
todo.txt
|
|
@ -1,8 +1,7 @@
|
||||||
version 0.8.14
|
version 0.8.14
|
||||||
==============
|
==============
|
||||||
|
|
||||||
- fix powerpc64 crashes
|
- bug: tsortdev does not run with native GC?
|
||||||
- bug: tsortdev does not run with native GC
|
|
||||||
- object {.pure, final.} does not work again!
|
- object {.pure, final.} does not work again!
|
||||||
- ``=`` should be overloadable; requires specialization for ``=``?
|
- ``=`` should be overloadable; requires specialization for ``=``?
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue