Skip to content

fix(macro): default untyped throws to any Swift.Error - #142

Merged
Kolos65 merged 1 commit into
Kolos65:mainfrom
christophsturm:fix-swift6-any-error-redundancy
Mar 18, 2026
Merged

fix(macro): default untyped throws to any Swift.Error#142
Kolos65 merged 1 commit into
Kolos65:mainfrom
christophsturm:fix-swift6-any-error-redundancy

Conversation

@christophsturm

Copy link
Copy Markdown
Contributor

Emit any Swift.Error for untyped throwing requirements in generated builders.

This keeps Error disambiguation (Swift.Error) and avoids ExistentialAny diagnostics for generated mocks compiled with stricter warning settings.

Add a compact compile-regression test that shadows Error with a typealias, which fails to compile with unqualified Error codegen.

Emit any Swift.Error for untyped throwing requirements in generated builders.

This keeps Error disambiguation (Swift.Error) and avoids ExistentialAny diagnostics
for generated mocks compiled with stricter warning settings.

Add a compact compile-regression test that shadows Error with a typealias,
which fails to compile with unqualified Error codegen.
@Kolos65

Kolos65 commented Mar 17, 2026

Copy link
Copy Markdown
Owner

@christophsturm Thanks for the fix, sorry for the delay!

@Kolos65
Kolos65 merged commit bd20509 into Kolos65:main Mar 18, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants