mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When importing a C++ struct, if its owning module requires cplusplus, Swift tried to auto-conform it to certain protocols from the Cxx module. This triggers name lookup in the clang struct, specifically for `__beginUnsafe()` and `__endUnsafe` methods, which imports all of the base structs including their methods. This moves the import of base structs out of the name lookup request, preventing cycles. rdar://116426238
7 lines
217 B
Swift
7 lines
217 B
Swift
// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -validate-tbd-against-ir=none
|
|
// We should not fail with a circular reference error here.
|
|
|
|
import ReferenceToDerived
|
|
|
|
func foo(_ x: D) {}
|