From c97a20ce492f335067c3e53731f60023fb39ae9d Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sun, 4 Aug 2024 07:24:59 +0800 Subject: [PATCH] closes #21347; adds a test case (#23917) closes #21347 --- tests/generics/tgeneric0.nim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/generics/tgeneric0.nim b/tests/generics/tgeneric0.nim index e0b61a58d7a9..16a148f7bba2 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