File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ # XFAIL: target-windows
2
+
3
+ # Test Swift function name printing in backtraces.
4
+
5
+ # RUN: split-file %s %t
6
+ # RUN: %target-swiftc -g %t/main.swift -o %t.out
7
+ # RUN: %lldb -x -b -s %t/commands.input %t.out -o exit 2>&1 \
8
+ # RUN: | FileCheck %s
9
+
10
+ #--- main.swift
11
+ func foo() async -> Int {
12
+ let t = await try! bar(a: 1, b: 1)
13
+ var baz = Baz(baz: 1)
14
+ var qux = baz.qux(a: 1)
15
+ return qux(1)
16
+ }
17
+
18
+ var res = {
19
+ (index: Int) -> Int in
20
+ return index + 10
21
+ }(1)
22
+
23
+ fileprivate func bar(a: Int, b: Int) async throws -> Int {
24
+ return res + a + b
25
+ }
26
+
27
+ struct Baz {
28
+ var baz: Int
29
+ mutating func qux<T>(a: T) -> (Int) -> Int {
30
+ baz += 1
31
+ print(a)
32
+ return {$0 + 1}
33
+ }
34
+ }
35
+
36
+ await foo()
37
+
38
+ #--- commands.input
39
+ b qux
40
+
41
+ run
42
+ bt
43
+
44
+ # CHECK: main`Baz.qux<Int>(a=1)
45
+ # CHECK: main`foo()
You can’t perform that action at this time.
0 commit comments