mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This removes a longstanding workaround in the import logic for C++ structs: Swift assumed that if a C++ struct has no copy constructor that is explicitly deleted, then the struct is copyable. This is not actually correct. This replaces the workaround with a proper check for the presence of a C++ copy constructor. rdar://136838485
9 lines
436 B
Swift
9 lines
436 B
Swift
// RUN: %target-swift-ide-test -print-module -module-to-print=Constructors -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
|
|
|
|
// CHECK: struct TemplatedCopyConstructor
|
|
// CHECK: struct TemplatedCopyConstructorWithExtraArg
|
|
|
|
// Make sure we don't import non-copyable types because we will have no way to
|
|
// represent and copy/move these in swift with correct semantics.
|
|
// CHECK-NOT: DeletedCopyConstructor
|