Skip to content

[cxx-interop] a Swift module that enables interop should not force client Swift module to fail to import CxxShim #65831

@hyp

Description

@hyp

RIght now when a Swift module A enables interoperability, and Swift module B that consumes it doesn't, the compiler will fail to compile B with the following error:

lib/swift/macosx/arm64/libcxxshim.modulemap:1:8: error: module 'CxxShim' requires feature 'cplusplus'
module CxxShim {
       ^
<unknown>:0: error: could not build Objective-C module 'CxxShim'

--

Module A should not force the client to consume B, or if B consumes it, it should not require cplusplus.

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.c++ interopFeature: Interoperability with C++triage neededThis issue needs more specific labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions