mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This fixes a logic error in the existing code that cause these function arguments to appear twice, once as local variable and once as formal parameter. rdar://problem/37410759
11 lines
329 B
Swift
11 lines
329 B
Swift
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
|
|
public func snd<T, U>(_ t : (T, U)) -> U {
|
|
let (_, y) = t
|
|
return y
|
|
}
|
|
|
|
// Test that the alloc_stack's argument number is preserved.
|
|
// CHECK-NOT: !DILocalVariable(name: "t"
|
|
// CHECK: !DILocalVariable(name: "t", arg: 1
|
|
// CHECK-NOT: !DILocalVariable(name: "t"
|