Skip to content

Commit 5129d82

Browse files
committed
Add more tests for @Concurrent function types
1 parent 9904026 commit 5129d82

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/attr/attr_concurrent.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ func f(_ fn: @concurrent (Int) -> Int) { }
77
// Okay to overload @concurrent vs. not concurrent
88
func f(_ fn: (Int) -> Int) { }
99

10+
// Concurrent attribute with other function attributes.
11+
func onEscaping(_ fn: @escaping @concurrent (Int) -> Int) { }
12+
func onEscaping2(_ fn: @concurrent @escaping (Int) -> Int) { }
13+
func onAutoclosure(_ fn: @autoclosure @concurrent () -> Int) { }
14+
func onAutoclosure2(_ fn: @concurrent @autoclosure () -> Int) { }
15+
func onEscapingAutoclosure(_ fn: @concurrent @autoclosure @escaping () -> Int) { }
16+
func onEscapingAutoclosure2(_ fn: @escaping @autoclosure @concurrent () -> Int) { }
1017

1118
func acceptsConcurrent(_ fn: @concurrent (Int) -> Int) { }
1219
func acceptsNonConcurrent(_ fn: (Int) -> Int) { }

0 commit comments

Comments
 (0)