mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
* Don't ignore return in semTemplateDef * Add test --------- Co-authored-by: SirOlaf <>
This commit is contained in:
8
tests/template/t21532.nim
Normal file
8
tests/template/t21532.nim
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user