Skip to content

Commit 4ade05a

Browse files
authored
Merge pull request swiftlang#23641 from compnerd/long-is-not-very-long
2 parents 0081dec + ae57fc9 commit 4ade05a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/ClangImporter/cfuncs_parse.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ func test_cfunc1(_ i: Int) {
99
}
1010

1111
func test_cfunc2(_ i: Int) {
12+
#if os(Windows) && (arch(arm64) || arch(x86_64))
13+
// LLP64 targets will import `long` as `Int32`
14+
let f = cfunc2(Int32(i), 17)
15+
#else
1216
let f = cfunc2(i, 17)
17+
#endif
1318
_ = f as Float
1419
cfunc2(b:17, a:i) // expected-error{{extraneous argument labels 'b:a:' in call}}
1520
cfunc2(17, i) // expected-error{{cannot convert value of type 'Int' to expected argument type 'Int32'}}

0 commit comments

Comments
 (0)