mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
fixes #24258 It uses conditionals to guard against ill formed AST to produce better error messages, rather than crashing
10 lines
206 B
Nim
10 lines
206 B
Nim
discard """
|
|
cmd: "nim check $file"
|
|
errormsg: "illformed AST: [22]43.len"
|
|
joinable: false
|
|
"""
|
|
|
|
template encodeList*(args: varargs[untyped]): seq[byte] =
|
|
@[byte args.len]
|
|
|
|
let x = encodeList([22], 43) |