Open NachoSoto opened 2 weeks ago
// Module 1 public struct E1: Error {} public func f1() throws(E1) {} // Module 2 import Module1 func f2() throws { f1() }
Changing public func f1() throws(E1) {} to public func f1() throws {} (or doing the reverse) leads to a linking failure:
public func f1() throws(E1) {}
public func f1() throws {}
Undefined symbol: Module1.f() throws(Module1.E1)
The compiler handles the modification.
swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4) Target: arm64-apple-macosx15.0
This is just one very specific example, but this happens incredibly often when changing declarations referenced across modules.
Reproduction
Changing
public func f1() throws(E1) {}
topublic func f1() throws {}
(or doing the reverse) leads to a linking failure:Expected behavior
The compiler handles the modification.
Environment