Skip to content

Commit 767423a

Browse files
committed
Add regression test to close #59572
1 parent f6b39ae commit 767423a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: %target-swift-emit-ir %s
2+
3+
// https://github.com/apple/swift/issues/59572
4+
5+
func foo<T: RawRepresentable>(src: Any, target: inout T) where T.RawValue == UInt {
6+
if let x = src as? UInt, let x = T(rawValue: x) {
7+
target = x
8+
}
9+
}

0 commit comments

Comments
 (0)