mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If the pattern doesn't have any pack parameters in it anymore, we need to recover the substituted count type from the original count type. Fixes rdar://problem/112065340.
9 lines
248 B
Swift
9 lines
248 B
Swift
// RUN: %target-swift-frontend -emit-ir %s
|
|
|
|
public func test<each T: BinaryInteger>(_ values: repeat each T) {
|
|
var values = (repeat UInt32(truncatingIfNeeded: each values))
|
|
withUnsafePointer(to: &values) { ptr in
|
|
_ = ptr[0]
|
|
}
|
|
}
|