Skip to content

Commit 4148684

Browse files
authored
Merge pull request swiftlang#63648 from Azoy/fix-function-metadata-test
[test] Disallow block convention on non ObjC interop test
2 parents ab42032 + 4bd09ff commit 4148684

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/stdlib/_Runtime/Metadata/FunctionMetadata.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,13 @@ if #available(SwiftStdlib 5.9, *) {
120120

121121
expectEqual(fn11.convention, .c)
122122

123+
// Block calling conventions are only supported on platforms with an
124+
// ObjectiveC interop.
125+
#if canImport(ObjectiveC)
123126
let fn12 = Metadata((@convention(block) () -> Int).self).function
124127

125128
expectEqual(fn12.convention, .block)
129+
#endif
126130
}
127131
}
128132

0 commit comments

Comments
 (0)