Files
swift-mirror/test/SILGen/partial_apply_protocol_class_refinement_method.swift
Kavon Farvardin d2bd562799 Test: send shadow RUN lines to /dev/null
The opaque values test coverage I initially added will emit to
stdout, which is noisy for people's logs if the test is failing for
some other reason.
2026-06-30 17:40:48 -07:00

19 lines
764 B
Swift

// RUN: %target-swift-emit-silgen-ossa -o /dev/null -enable-sil-opaque-values %s
// RUN: %target-swift-emit-silgen -Xllvm -sil-print-types -module-name partial_apply_protocol_class_refinement_method %s | %FileCheck %s
protocol P { func foo() }
protocol Q: class, P {}
// CHECK-LABEL: sil hidden [ossa] @$s46partial_apply_protocol_class_refinement_method0A5ApplyyyycAA1Q_pF : $@convention
// CHECK: bb0([[ARG:%.*]] : @guaranteed $any Q):
func partialApply(_ q: Q) -> () -> () {
// CHECK: [[OPENED:%.*]] = open_existential_ref [[ARG]]
// CHECK: [[TMP:%.*]] = alloc_stack
// CHECK: [[SB:%.*]] = store_borrow [[OPENED]] to [[TMP:%.*]] :
// CHECK: apply {{%.*}}<{{.*}}>([[SB]])
// CHECK: end_borrow
// CHECK-NEXT: dealloc_stack [[TMP]]
return q.foo
}