From 2dcc7195daab5964a68d7eb6edf897edc0cf2052 Mon Sep 17 00:00:00 2001 From: metagn Date: Sat, 27 May 2023 21:09:34 +0300 Subject: support generic void return type for templates (#21934) fixes #21920 --- tests/template/template_issues.nim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/template') 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 -- cgit 1.4.1-2-gfad0