[SR-13350] @_exported import
does not properly export custom operators
#55790
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Environment
Xcode Version 11.6 (11E708)
macOS 10.15.6
Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
Additional Detail from JIRA
md5: c145292c88b0c80e3366b424ca791f0b
duplicates:
Issue Description:
Suppose you have a library with two targets: "Numerics" and "ReadModule". "Realmodule" has a public function named "realModuleTest". "Numerics" has a single file with the following line:
When you `import Numerics` into your project, you get access to "realModuleTest". This, as far as I understand, is the whole point of `@_exported import`.
However, when you define a custom operator inside of "RealModule", it does not get properly exported to "Numerics". Here is the custom operator I defined:
I have uploaded this package to github: https://github.com/Peter-Schorn/OperatorAccessPackage
Please import the package into a command-line project and add the following to main.swift:
You get the weird error described above. Surely this must be a bug, right?
UPDATE: I tried defining a custom infix and prefix operator and found that both were exported just fine. Therefore, this must be specific to infix operators.
The text was updated successfully, but these errors were encountered: