Files
swift-mirror/test/SILGen/parameterized_existentials_reabstraction.swift
Allan Shortlidge 92372d8c8a test: Remove -disable-availability-checking where it has no effect.
None of these tests use an availability gated language feature or standard
library API at the deployment target they compile with, so the flag suppresses
no diagnostics. Remove it rather than replacing it with a deployment target.

Verified by running each test with the flag removed. The one exception is
attr_target_x86_64.swift, which only runs on x86_64 hosts; its arm64 twin,
attr_target_arm64.swift, is verified and the two differ only in the CPU
features they name.
2026-09-10 15:46:52 -07:00

17 lines
759 B
Swift

// RUN: %target-swift-emit-silgen-ossa -o /dev/null -enable-sil-opaque-values %s
// RUN: %target-swift-emit-silgen %s | %FileCheck %s
protocol P<A> {
associatedtype A
associatedtype B
var function: () -> B { get }
}
func f<A>(p: any P<A>) {
_ = p.function()
}
// CHECK-LABEL: sil hidden [ossa] @$s40parameterized_existentials_reabstraction1f1pyAA1P_px1ARts_XP_tlF : $@convention(thin) <A> (@in_guaranteed any P<A>) -> () {
// CHECK-LABEL: sil shared [transparent] [serialized] [reabstraction_thunk] [ossa] @$s1B40parameterized_existentials_reabstraction1PPQyd__Iegr_ypIegr_1AQyd__RszAbCRd__r__lTR : $@convention(thin) <τ_0_0><τ_1_0 where τ_0_0 == τ_1_0.A, τ_1_0 : P> (@guaranteed @callee_guaranteed () -> @out τ_1_0.B) -> @out Any {