File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
lldb/test/API/lang/swift/async Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 1
1
SWIFT_SOURCES := main.swift
2
- SWIFTFLAGS_EXTRAS := -Xfrontend -enable-experimental-concurrency
2
+ SWIFTFLAGS_EXTRAS := -Xfrontend -enable-experimental-concurrency -parse-as-library
3
3
include Makefile.rules
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ func sayGeneric<T>(_ msg: T) async {
11
11
print ( msg) // And also here.
12
12
}
13
13
14
- runAsyncAndBlock {
15
- await sayHello ( )
16
- await sayGeneric ( " world " )
14
+ @main struct Main {
15
+ static func main( ) async {
16
+ await sayHello ( )
17
+ await sayGeneric ( " world " )
18
+ }
17
19
}
Original file line number Diff line number Diff line change 1
1
SWIFT_SOURCES := main.swift
2
- SWIFTFLAGS_EXTRAS := -Xfrontend -enable-experimental-concurrency
2
+ SWIFTFLAGS_EXTRAS := -Xfrontend -enable-experimental-concurrency -parse-as-library
3
3
include Makefile.rules
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ func sayGeneric<T>(_ msg: T) async {
20
20
print ( " \( str) after calls - arg \( msg) " )
21
21
}
22
22
23
- runAsyncAndBlock {
24
- await sayGeneric ( " world " )
25
- await sayHello ( )
23
+ @main struct Main {
24
+ static func main( ) async {
25
+ await sayGeneric ( " world " )
26
+ await sayHello ( )
27
+ }
26
28
}
You can’t perform that action at this time.
0 commit comments