Files
swift-mirror/test/SILOptimizer/specialize_missing_sendable.swift
Erik Eckstein c8e74b8393 Generic specialization: change the mangling for dropped metatype arguments
Instead of adding a "flag" (`m` in `...Tgm5`) make it more generic to allow to drop any unused argument.
Add all dropped arguments with a `t<n-1>` (where `<n-1>` is empty for n === 0). For example `...Ttt2g5`.
2024-08-26 10:43:15 +02:00

16 lines
526 B
Swift

// RUN: %target-swift-frontend -emit-sil %s -O -swift-version 5 | %FileCheck %s
public final class Class<T: Sendable> {
@inline(never)
public init() {}
}
public protocol P {}
// CHECK-LABEL: sil @$s27specialize_missing_sendable6callerAA5ClassCyAA1P_pGyF : $@convention(thin) () -> @owned Class<any P> {
public func caller() -> Class<any P> {
// CHECK: function_ref @$s27specialize_missing_sendable5ClassCACyxGycfCAA1P_p_Ttg5 : $@convention(thin) () -> @owned Class<any P>
// CHECK: return
return Class<any P>()
}