mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
10 lines
239 B
Swift
10 lines
239 B
Swift
// RUN: %target-swift-emit-ir %s
|
|
|
|
// https://github.com/apple/swift/issues/59572
|
|
|
|
func foo<T: RawRepresentable>(src: Any, target: inout T) where T.RawValue == UInt {
|
|
if let x = src as? UInt, let x = T(rawValue: x) {
|
|
target = x
|
|
}
|
|
}
|