diff options
author | metagn <metagngn@gmail.com> | 2023-05-27 21:09:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-27 20:09:34 +0200 |
commit | 2dcc7195daab5964a68d7eb6edf897edc0cf2052 (patch) | |
tree | 097b23fba4d9be9796886e611c982d901dd08eb6 /tests/template | |
parent | ef3c0bec1cf02049402a482393581c0a80dd884b (diff) | |
download | Nim-2dcc7195daab5964a68d7eb6edf897edc0cf2052.tar.gz |
support generic void return type for templates (#21934)
fixes #21920
Diffstat (limited to 'tests/template')
-rw-r--r-- | tests/template/template_issues.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/template/template_issues.nim b/tests/template/template_issues.nim index 1fed694ef..58c40941d 100644 --- a/tests/template/template_issues.nim +++ b/tests/template/template_issues.nim @@ -296,3 +296,9 @@ block: # bug #12595 discard {i: ""} test() + +block: # bug #21920 + template t[T](): T = + discard + + t[void]() # Error: expression has no type: discard |