mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
* rename a test so it runs in CI; merge several tests with nim check * continue * continue * continue * rename tests/errmsgs/undeclared_routine_compiles.nim -> tests/errmsgs/tundeclared_routine_compiles.nim
12 lines
219 B
Nim
12 lines
219 B
Nim
# D20180828T234921:here
|
|
template foo*(iter: untyped): untyped =
|
|
when compiles(iter.unexistingField): 0
|
|
elif compiles(iter.len): 1
|
|
else: 2
|
|
|
|
proc foo[A]()=
|
|
let a2 = @[10, 11]
|
|
let a3 = foo(pairs(a2))
|
|
|
|
foo[int]()
|