Fixes #5062 (#5527); JS: holes in enums

This commit is contained in:
Silvio
2017-03-15 10:33:37 +01:00
committed by Andreas Rumpf
parent ebb15505dd
commit 51cd3bd86f
9 changed files with 95 additions and 27 deletions

11
tests/enum/tbasicenum.nim Normal file
View File

@@ -0,0 +1,11 @@
discard """
file: "tbasicenum.nim"
output: "ABCDC"
"""
type
MyEnum = enum
A,B,C,D
# trick the optimizer with an seq:
var x = @[A,B,C,D]
echo x[0],x[1],x[2],x[3],MyEnum(2)