Files
swift-mirror/test/SILGen/partial_apply_protocol_class_refinement_method.swift
T
Michael Gottesman 6f4e87ad3f [+0-all-args] Be explicit about the module-name for tests that have plus_zero_* counterparts.
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
2018-03-11 21:55:24 -07:00

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
}