Files
swift-mirror/validation-test/compiler_crashers_2_fixed/rdar112065340.swift
Slava Pestov e0a1a11a6b SIL: Fix substituted function type visitor for PackExpansionType with concrete pattern type
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.
2023-07-18 12:19:22 -04:00

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]
}
}