Add testcase for #5993 (#16789)

This commit is contained in:
Clyybber
2021-01-22 02:11:21 +01:00
committed by GitHub
parent fdf4f74cd1
commit 3df652b90b

View File

@@ -274,3 +274,19 @@ ggg(hello)
var z = 10'u8
echo z < 9 # Works
echo z > 9 # Error: type mismatch
# bug #5993
template foo(p: proc) =
var bla = 5
p(bla)
foo() do(t: var int):
discard
t = 5
proc bar(t: var int) =
t = 5
foo(bar)