This problem is caused due to a name collision between the module itself and the type. We have a bunch of bug reports related to this... There's a temporary workaround for this (use the `-Xfrontend -module-interface-preserve-types-as-written`) flag if you really need to use it but the best way forward is to rename the type to avoid the name collision with the module.
This is a special case of SR-898 occurring in a module interface file. When a visible type has the same name as a module, the type shadows the module and there is currently no syntax to get around that.
Fixing this properly will require a language change like the module selectors pitch. We think it's a good idea, but we haven't found the time to do it yet.
Until we have something like that, Varun's suggested workarounds are good ones.
Attachment: Download
Environment
xcode 11.4
Additional Detail from JIRA
md5: 68f187714507556e295d5536bfcad851
duplicates:
Issue Description:
Problem
The generated module interface file below will got an error when parsed by xcode.
("A" is the name of the framework)
Source code
Steps to Reproduce
build a framework with the source above, with "Build Libraries for Distribution" enabled
delete the .swiftinterface files in the framework
add the generated framework to another project, import and build
Why Important
The module interface cannot be used , which means module stability never achieve its goal.
The text was updated successfully, but these errors were encountered: