summary refs log tree commit diff stats
path: root/tests/generics/t3770.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-04-13 18:11:06 +0800
committerGitHub <noreply@github.com>2023-04-13 12:11:06 +0200
commit16f42084d32144d5afb2a5cc3a5a833e5295a8bc (patch)
treecee13e611922cc1f232423718ec1af314b79e698 /tests/generics/t3770.nim
parent3f51b6f73ddc476c645f1e3e0205d2f203eaf8e2 (diff)
downloadNim-16f42084d32144d5afb2a5cc3a5a833e5295a8bc.tar.gz
fixes #20900; Calling template through from generic function across module fails to build (#21649)
* fixes #20900; Calling template through from generic function across module fails to build

* sanother way
Diffstat (limited to 'tests/generics/t3770.nim')
-rw-r--r--tests/generics/t3770.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/generics/t3770.nim b/tests/generics/t3770.nim
index fa9c97df8..ffccbeeb5 100644
--- a/tests/generics/t3770.nim
+++ b/tests/generics/t3770.nim
@@ -7,3 +7,7 @@ proc someGeneric(_: type) =
   doAssert $jjj() == "(hidden: 15)" # fails: "Error: the field 'hidden' is not accessible."
 
 someGeneric(int)
+
+# bug #20900
+proc c(y: int | int, w: Opt = Opt.none) = discard
+c(0)