mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
It's required that ParamDecl's that are synthesized have a specifier set. Set it to InOut, matching SILGen's behavior in emitIndirectResultParameters.
12 lines
557 B
Swift
12 lines
557 B
Swift
// RUN: %target-swift-frontend -enable-sil-opaque-values -parse-as-library -emit-sil -O %s | %FileCheck %s
|
|
|
|
// Verify the arguments. When AccessPathVerification runs, it will be checked
|
|
// that the ParamDecl that AddressLowering synthesizes has a specifier
|
|
// (ParamSpecifier) set.
|
|
// CHECK-LABEL: sil @$s15opaque_values_O3minyxx_xtSLRzlF : {{.*}} {
|
|
// CHECK: bb0(%0 : $*T, %1 : $*T, %2 : $*T):
|
|
// CHECK-LABEL: } // end sil function '$s15opaque_values_O3minyxx_xtSLRzlF'
|
|
public func min<T: Comparable>(_ x: T, _ y: T) -> T {
|
|
return y < x ? y : x
|
|
}
|