-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.c++ interopFeature: Interoperability with C++Feature: Interoperability with C++triage neededThis issue needs more specific labelsThis issue needs more specific labels
Description
Right now when a Swift module A enables interoperability and imports a C++ module cxxmod
, and Swift module B that consumes it doesn't, the compiler will fail to compile B with the following error:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "cxxmod.h"
^
/Users/alex/i/swift/test/Interop/SwiftToCxx/cross-module-refs/Inputs/cxxmod.h:1:1: error: unknown type name 'class'; did you mean 'Class'?
class TestMough {
^
<unknown>:0: note: 'Class' declared here
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "cxxmod.h"
^
/Users/alex/i/swift/test/Interop/SwiftToCxx/cross-module-refs/Inputs/cxxmod.h:1:16: error: expected ';' after top level declarator
class TestMough {
^
<unknown>:0: error: could not build Objective-C module 'cxxmod'
The diagnostic should be improved to be more clear that the client needs to enable interoperability.
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.c++ interopFeature: Interoperability with C++Feature: Interoperability with C++triage neededThis issue needs more specific labelsThis issue needs more specific labels