summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/generics/tgeneric0.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/generics/tgeneric0.nim b/tests/generics/tgeneric0.nim
index e0b61a58d..16a148f7b 100644
--- a/tests/generics/tgeneric0.nim
+++ b/tests/generics/tgeneric0.nim
@@ -186,3 +186,11 @@ block:
 
   var b: JsonValueRef[string]
   scanValue(b)
+
+block: # bug #21347
+  type K[T] = object
+  template s[T]() = discard
+  proc b1(n: bool | bool) = s[K[K[int]]]()
+  proc b2(n: bool) =        s[K[K[int]]]()
+  b1(false)   # Error: 's' has unspecified generic parameters
+  b2(false)   # Builds, on its own