Files
swift-mirror/lib/AST/ImportCache.cpp
Robert Widmann 08940882c8 Restrict Weak-Re-Exports To @_exported Modules
This code got refactored and it accidentally widened the applicable structures for this check. The idea is that you have the following structure

// Module A
@_weakLinked import B

// Module B
@_exported import C

And the compiler conspires to make it so the modules B AND C wind up weak-linked from module A.

The broadened check accidentally allowed the following:

// Module A
@_weakLinked import B

// Module B
import C // Oops!

Which caused quite a few more modules than were intended to be weak-linked. Restore the `Exported` filter to cut back on the amount of weak re-exports the compiler processes.

Resolves rdar://142706779
2025-01-14 12:11:05 -07:00

14 KiB