diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-08-04 07:24:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-04 07:24:59 +0800 |
commit | c97a20ce492f335067c3e53731f60023fb39ae9d (patch) | |
tree | a260fbb4a753c70d8b65fa60daf6e12784c26b4b | |
parent | 12b968029159ae05b9813095fbe671e4aa57922b (diff) | |
download | Nim-c97a20ce492f335067c3e53731f60023fb39ae9d.tar.gz |
closes #21347; adds a test case (#23917)
closes #21347
-rw-r--r-- | tests/generics/tgeneric0.nim | 8 |
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 |