Files
Nim/tests/errmsgs/t12844.nim
Neelesh Chandola 4c08e64e98 disallow typedesc in arrays & move existing checks to types.typeAllowedAux (#13261)
* disallow typedesc in arrays and move previous checks to types.typeAllowedAux
2020-05-29 11:48:15 +02:00

14 lines
503 B
Nim

discard """
cmd: "nim check $file"
errormsg: "invalid type: 'template (args: varargs[string])' for var. Did you mean to call the template with '()'?"
nimout: '''
t12844.nim(11, 7) Error: invalid type: 'template (args: varargs[string])' for const. Did you mean to call the template with '()'?
t12844.nim(12, 5) Error: invalid type: 'template (args: varargs[string])' for var. Did you mean to call the template with '()'?'''
"""
template z*(args: varargs[string, `$`]) =
discard
const x = z
var y = z