We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ad33bf + 69727bb commit 2658192Copy full SHA for 2658192
test/Interop/Cxx/objc-correctness/Inputs/POSIX.h
@@ -0,0 +1,9 @@
1
+typedef unsigned int __uint32_t;
2
+typedef unsigned int u_int32_t;
3
+typedef __uint32_t in_addr_t;
4
+
5
+struct in_addr {
6
+ in_addr_t s_addr;
7
+};
8
9
+#define INADDR_ANY (u_int32_t)0x00000000
test/Interop/Cxx/objc-correctness/Inputs/module.modulemap
@@ -38,3 +38,7 @@ module NSTextCheckingResult {
38
header "NSTextCheckingResult.h"
39
requires objc
40
}
41
42
+module MockPOSIX {
43
+ header "POSIX.h"
44
+}
test/Interop/Cxx/objc-correctness/posix.swift
@@ -0,0 +1,6 @@
+// RUN: %target-swift-frontend -typecheck -verify -I %S/Inputs -cxx-interoperability-mode=swift-5.9 %s
+// REQUIRES: objc_interop
+import MockPOSIX
+let _ = in_addr(s_addr: INADDR_ANY)
0 commit comments