mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-09 06:23:25 +00:00
* Don't ignore return in semTemplateDef
* Add test
---------
Co-authored-by: SirOlaf <>
(cherry picked from commit 3de75ffc02)
8 lines
146 B
Nim
8 lines
146 B
Nim
|
|
template elementType(a: untyped): typedesc =
|
|
typeof(block: (for ai in a: ai))
|
|
|
|
func fn[T](a: T) =
|
|
doAssert elementType(a) is int
|
|
|
|
@[1,2,3].fn |