You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should see the following error when building module `C`:
/Users/tanner/dev/tanner0101/swift-operator-bug/Sources/C/main.swift:3:9: error: operator is not a known binary operator
print(1 ~~ 2)
^
This error can be worked around by manually importing module `A` where `~~` is defined. However, this should not be required since module `B` is imported by `C` and module `A` is `@_exported` by module `B`.
Operator lookup goes via a slightly different code path than value member lookup. It should be refactored to use the same ImportSet abstraction, ensuring that re-exports are taken into consideration.
Environment
Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin19.2.0
macOS 10.15.2
Xcode 11.3 (11C29)
Additional Detail from JIRA
md5: 152908bce7566937d084ec853cd3b3c2
is duplicated by:
@_exported import
does not properly export custom operatorsIssue Description:
Exporting a module using `@_exported` does not export custom operators declared in that module.
I've created a reproduction of this bug here:
https://github.com/tanner0101/swift-operator-bug
To exhibit the bug, run `swift build`.
You should see the following error when building module `C`:
This error can be worked around by manually importing module `A` where `~~` is defined. However, this should not be required since module `B` is imported by `C` and module `A` is `@_exported` by module `B`.
Module A:
Module B:
Module C:
The text was updated successfully, but these errors were encountered: