diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-03-07 17:34:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 17:34:02 +0800 |
commit | 6ef94301538f0a17461630c08c456112954e66bb (patch) | |
tree | fcec8c724e1769110d2ade5986bff707b5195b26 | |
parent | 25eef64fe1969581436696556e0bf10ef25aa3ec (diff) | |
download | Nim-6ef94301538f0a17461630c08c456112954e66bb.tar.gz |
closes #6231; add a test case (#21485)
-rw-r--r-- | tests/generics/tgenerics_various.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/generics/tgenerics_various.nim b/tests/generics/tgenerics_various.nim index 37b6e43a1..4cfa47809 100644 --- a/tests/generics/tgenerics_various.nim +++ b/tests/generics/tgenerics_various.nim @@ -262,3 +262,8 @@ proc doSomething[A, B](t: tuple[a: A, b: B]) = discard discard identity((c: 1, d: 2)) doSomething(identity((1, 2))) + +# bug #6231 +proc myProc[T, U](x: T or U) = discard + +myProc[int, string](x = 2) |