mirror of
https://github.com/apple/swift.git
synced 2026-06-27 12:25:55 +02:00
6f4e87ad3f
Otherwise, the plus_zero_* tests will have plus_zero_* as a module name, causing massive FileCheck problems. The reason why I am doing it with the main tests is so that I can use it when syncing branches/etc. radar://34222540
18 lines
654 B
Swift
18 lines
654 B
Swift
// REQUIRES: plus_one_runtime
|
|
|
|
// RUN: %target-swift-frontend -module-name partial_apply_protocol_class_refinement_method -emit-silgen -enable-sil-ownership %s | %FileCheck %s
|
|
|
|
protocol P { func foo() }
|
|
protocol Q: class, P {}
|
|
|
|
// CHECK-LABEL: sil hidden @$S46partial_apply_protocol_class_refinement_method0A5ApplyyyycAA1Q_pF
|
|
func partialApply(_ q: Q) -> () -> () {
|
|
// CHECK: [[OPENED:%.*]] = open_existential_ref
|
|
// CHECK: [[COPY:%.*]] = copy_value [[OPENED]]
|
|
// CHECK: [[TMP:%.*]] = alloc_stack
|
|
// CHECK: store [[COPY]] to [init] [[TMP:%.*]] :
|
|
// CHECK: apply {{%.*}}<{{.*}}>([[TMP]])
|
|
// CHECK-NEXT: dealloc_stack [[TMP]]
|
|
return q.foo
|
|
}
|