closes #6231; add a test case (#21485)

(cherry picked from commit 6ef9430153)
This commit is contained in:
ringabout
2023-03-07 17:34:02 +08:00
committed by narimiran
parent 87bd753cb3
commit 5bddac3e34

View File

@@ -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)