Files
swift-mirror/test/SILGen/backdeployed.swift
T
Kavon Farvardin 45fad55994 SILGen: fix mismatch in expectations of substitution map
The backdeployment thunk is calling into a method within a
constrained extension, but it's constrained the generic
parameter to a fixed type.

So, there is no invocation generic signature, thus no
substitution map is expected by the assertion added in
https://github.com/swiftlang/swift/pull/88160

resolves rdar://174437884
2026-04-09 14:14:35 -07:00

18 lines
395 B
Swift

// RUN: %target-swift-emit-silgen %s
// Exercises a SILGen code path that would trigger an assertion.
public struct Anchor<Value> {}
extension Anchor where Value == String {
@backDeployed(before: macOS 26.0)
public static func fixedGenericParam() -> Value {
return "hello"
}
@backDeployed(before: macOS 26.0)
public static func generic<T>(_ t: T) -> T {
return t
}
}