Skip to content

Commit 5ed2d75

Browse files
committed
attr: fix test on Windows
`Int` on Windows x86_64 is different from `Int` on other targets due to it being a LLP64 target. Explicitly use the `Int32` type for the enumeration to fix the test.
1 parent c4891cb commit 5ed2d75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/attr/attr_cdecl.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ var computed: Int {
1818

1919
struct SwiftStruct { var x, y: Int }
2020
enum SwiftEnum { case A, B }
21+
#if os(Windows) && arch(x86_64)
22+
@objc enum CEnum: Int32 { case A, B }
23+
#else
2124
@objc enum CEnum: Int { case A, B }
25+
#endif
2226

2327
@_cdecl("swiftStruct")
2428
func swiftStruct(x: SwiftStruct) {} // expected-error{{cannot be represented}} expected-note{{Swift struct}}

0 commit comments

Comments
 (0)