Skip to content

Removing throws(E) type from a declaration in one module breaks incremental compilation #77296

Open
@NachoSoto

Description

@NachoSoto

Reproduction

// 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:

Undefined symbol: Module1.f() throws(Module1.E1)

Expected behavior

The compiler handles the modification.

Environment

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.incremental compilation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions