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

This commit is contained in:
ringabout 2023-03-07 17:34:02 +08:00 • committed by GitHub
commit 6ef9430153
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -262,3 +262,8 @@ proc doSomething[A, B](t: tuple[a: A, b: B]) = discard
discard identity((c: 1, d: 2)) discard identity((c: 1, d: 2))
doSomething(identity((1, 2))) doSomething(identity((1, 2)))
# bug #6231
proc myProc[T, U](x: T or U) = discard
myProc[int, string](x = 2)