diff options
author | Clyybber <darkmine956@gmail.com> | 2021-01-22 02:11:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-22 02:11:21 +0100 |
commit | 3df652b90b9d5ccf7370ffb27eb5ee9f3c8a6cd2 (patch) | |
tree | 5c8a7a09200acf41a7c41ed0b7361e8c1b6a37d3 /tests | |
parent | fdf4f74cd111e64fa8416b8dc6cffd73cb5ab44b (diff) | |
download | Nim-3df652b90b9d5ccf7370ffb27eb5ee9f3c8a6cd2.tar.gz |
Add testcase for #5993 (#16789)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/template/template_issues.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/template/template_issues.nim b/tests/template/template_issues.nim index d12b3c3ef..b4b056da5 100644 --- a/tests/template/template_issues.nim +++ b/tests/template/template_issues.nim @@ -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) + |