summary refs log tree commit diff stats
path: root/tests/template
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-05-27 21:09:34 +0300
committerGitHub <noreply@github.com>2023-05-27 20:09:34 +0200
commit2dcc7195daab5964a68d7eb6edf897edc0cf2052 (patch)
tree097b23fba4d9be9796886e611c982d901dd08eb6 /tests/template
parentef3c0bec1cf02049402a482393581c0a80dd884b (diff)
downloadNim-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.nim6
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