Nim
Nim copied to clipboard
Internal error: getTypeDescAux(tyBuiltInTypeClass) with varargs[enum]
Hi, Nim team and caring community! :) I'm not sure if it's a bug, but since no warnings popped in the terminal I thought it will be legal to write as in the example below.
Throwing error getTypeDescAux(tyBuiltInTypeClass):
type Action = enum
Fire
Jump
proc test(keys: varargs[enum]) =
for k in keys:
echo k
test(Fire,Jump)
Works:
type Action = enum
Fire
Jump
proc test[T:enum](keys: varargs[T]) =
for k in keys:
echo k
test(Fire,Jump)
$ nim -v
Nim Compiler Version 1.6.6
Same error either
type Flags = enum
a, b
proc toX[T: SomeUnsignedInt, E: enum](s: varargs[E]): string = ""
echo toX[uint16, enum](a, b)
Nim Compiler Version 1.6.6 [Linux: amd64]
guess because enum is not concret type