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.
1 parent 0ca6106 commit e03903cCopy full SHA for e03903c
test/Interop/SwiftToCxx/class/class-api-prohibited.cpp
@@ -0,0 +1,12 @@
1
+// RUN: %empty-directory(%t)
2
+
3
+// RUN: %target-swift-frontend %S/swift-class-in-cxx.swift -typecheck -module-name Class -clang-header-expose-public-decls -emit-clang-header-path %t/class.h
4
5
+// RUN: not %target-interop-build-clangxx -c %s -I %t -o %t/swift-class-execution.o
6
7
+#include "class.h"
8
9
+void test(void * _Nonnull p) {
10
+ // Prohibited to construct class reference directly from opaque pointer.
11
+ Class::ClassWithIntField x(p);
12
+}
0 commit comments