Skip to content

Commit 61912a8

Browse files
Merge pull request #6962 from nate-chandler/cherrypick/release/5.9/rdar110195273
5.9: [lldb][Test] Check variadic generic vals with heap allocated metadata.
2 parents 464b04e + 816a177 commit 61912a8

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

lldb/test/API/lang/swift/variadic_generics/TestSwiftVariadicGenerics.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,16 @@ def test(self):
115115
# f9(s: S<repeat each T>)
116116
process.Continue()
117117
self.expect("frame variable", substrs=["t", "0 = 23", "1 = 2.71"])
118+
119+
# f10<each T>(args: repeat each T)
120+
process.Continue()
121+
self.expect(
122+
"frame variable", substrs=[
123+
"Pack{(a.A, a.B)}",
124+
"args",
125+
"i = 23",
126+
"d ="
127+
# FIXME: The wrong value for d is currently shown.
128+
#"d = 2.71"
129+
]
130+
)

lldb/test/API/lang/swift/variadic_generics/a.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,18 @@ func f9<each T>(s9: S<repeat each T>) {
6767
}
6868

6969
f9(s9: s)
70+
71+
func f10<each T>(args: repeat each T) {
72+
print("break here")
73+
}
74+
75+
func f10_maker<each T>(args: repeat each T) -> () -> () {
76+
return { f10(args: repeat each args) }
77+
}
78+
79+
func f10_caller() {
80+
let f10 = f10_maker(args: a, b)
81+
f10()
82+
}
83+
84+
f10_caller()

0 commit comments

Comments
 (0)