Skip to content

Commit ef8af2a

Browse files
Adding valid conventions on tests
1 parent a23d6b5 commit ef8af2a

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

test/attr/attr_convention.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,10 @@ func sr11027(_ f: @convention(block) @autoclosure () -> Int) -> Void {} // expec
1313
sr11027(1)
1414

1515
func sr11027_c(_ f: @convention(c) @autoclosure () -> Int) -> Void {} // expected-error{{@convention(c) attribute is not allowed on @autoclosure type}}
16-
sr11027_c(1)
16+
sr11027_c(1)
17+
18+
func sr11027_swift(_ f: @convention(swift) @autoclosure () -> Int) -> Void {} // OK
19+
sr11027_swift(1)
20+
21+
func sr11027_thin(_ f: @convention(thin) @autoclosure () -> Int) -> Void {} // OK
22+
sr11027_thin(1)

validation-test/compiler_crashers_2_fixed/sr11027.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,10 @@ func sr11027(_ f: @convention(block) @autoclosure () -> Int) -> Void {}
1111
sr11027(1)
1212

1313
func sr11027_c(_ f: @convention(c) @autoclosure () -> Int) -> Void {}
14-
sr11027_c(1)
14+
sr11027_c(1)
15+
16+
func sr11027_swift(_ f: @convention(swift) @autoclosure () -> Int) -> Void {} // OK
17+
sr11027_swift(1)
18+
19+
func sr11027_thin(_ f: @convention(thin) @autoclosure () -> Int) -> Void {} // OK
20+
sr11027_thin(1)

0 commit comments

Comments
 (0)