# \`@\_exported import\` does not properly export custom operators

**URL:** <https://forums.swift.org/t/exported-import-does-not-properly-export-custom-operators/39090>\
**Category:** Using Swift\
**Tags:** bug\
**Created:** [August 5, 2020, 3:45pm UTC](https://forums.swift.org/t/exported-import-does-not-properly-export-custom-operators/39090 "2020-08-05T15:45:28Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jrose](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jrose/32/408_2.png) [@jrose](https://forums.swift.org/u/jrose)\
**Post date:** [August 5, 2020, 8:12pm UTC](https://forums.swift.org/t/exported-import-does-not-properly-export-custom-operators/39090/5 "2020-08-05T20:12:03Z")

</div>

Definitely a bug. I'm surprised because at one point we had the _opposite_ bug, where operators _would_ be exported even when you _didn't_ use `@_exported` (which, yes, is not officially supported yet, but I'd be surprised if it changed very much when folks get around to finalizing it). The reason for that is because operator lookup goes through a different path than normal name lookup (or at least it used to), and while there was a reason for _that_ in the early Swift compiler architecture (which had more discrete passes) there's not really a good reason _now._ Someone should make OperatorDecls a kind of ValueDecl and remove all the custom operator lookup code.

(Operator decls aren't values, but neither are modules; it's just how the compiler models normal name lookup. Clang separates "NamedDecls" from ValueDecls for this reason.)

---

_[View the full topic](https://forums.swift.org/t/exported-import-does-not-properly-export-custom-operators/39090)._
