Skip to content

Commit bbde24c

Browse files
authored
Merge pull request swiftlang#23729 from compnerd/long-is-not-regular
test: avoid use of CLong in test
2 parents 60fc39e + 836cebb commit bbde24c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/ClangImporter/ctypes_parse.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,10 @@ func testFunctionPointers() {
208208
var anotherFP: @convention(c) (CInt, CLong, UnsafeMutableRawPointer?) -> Void
209209
= getFunctionPointer2()
210210

211+
var sizedFP: (@convention(c) (CInt, CInt, UnsafeMutableRawPointer?) -> Void)?
212+
211213
useFunctionPointer2(anotherFP)
212-
anotherFP = fp // expected-error {{cannot assign value of type 'fptr?' (aka 'Optional<@convention(c) (Int32) -> Int32>') to type '@convention(c) (CInt, CLong, UnsafeMutableRawPointer?) -> Void' (aka '@convention(c) (Int32, Int, Optional<UnsafeMutableRawPointer>) -> ()')}}
214+
sizedFP = fp // expected-error {{cannot assign value of type 'fptr?' (aka 'Optional<@convention(c) (Int32) -> Int32>') to type '(@convention(c) (CInt, CInt, UnsafeMutableRawPointer?) -> Void)?'}}
213215
}
214216

215217
func testStructDefaultInit() {

0 commit comments

Comments
 (0)