Skip to content

Use a consistent definition for unreachable code in macro expansions.#1166

Merged
grynspan merged 4 commits into
mainfrom
jgrynspan/more-unreachable
Jul 10, 2025
Merged

Use a consistent definition for unreachable code in macro expansions.#1166
grynspan merged 4 commits into
mainfrom
jgrynspan/more-unreachable

Conversation

@grynspan

@grynspan grynspan commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

This PR defines a single ExprSyntax instance we can use for unreachable code paths in macro expansions (where the compiler/swift-syntax requires us to produce an expression but we know we're going to emit an error anyway.)

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@grynspan grynspan added this to the Swift 6.x milestone Jun 20, 2025
@grynspan grynspan self-assigned this Jun 20, 2025
@grynspan grynspan requested a review from stmontgomery as a code owner June 20, 2025 21:22
@grynspan grynspan added the enhancement New feature or request label Jun 20, 2025
@grynspan grynspan added the macros 🔭 Related to Swift macros such as @Test or #expect label Jun 20, 2025
@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test

Comment thread Sources/TestingMacros/ConditionMacro.swift Outdated
@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test macOS

@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test Linux

@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test Windows

@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test macOS

@grynspan grynspan force-pushed the jgrynspan/more-unreachable branch from 9a52d94 to c7cc42b Compare June 23, 2025 19:21
@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test

grynspan and others added 2 commits June 25, 2025 12:16
This PR defines a single `ExprSyntax` instance we can use for unreachable code
paths in macro expansions (where the compiler/swift-syntax requires us to
produce an expression but we know we're going to emit an error anyway.)
@grynspan grynspan force-pushed the jgrynspan/more-unreachable branch from f1a5f8c to c746173 Compare June 25, 2025 16:19
@grynspan

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@grynspan grynspan merged commit f9fb1ec into main Jul 10, 2025
@grynspan grynspan deleted the jgrynspan/more-unreachable branch July 10, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request macros 🔭 Related to Swift macros such as @Test or #expect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants