Skip to content

Commit a3171a4

Browse files
committed
Remove a few more MacroExpansionContext existentials
1 parent 8efc674 commit a3171a4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/_SwiftSyntaxMacros/Syntax+MacroEvaluation.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ extension SyntaxProtocol {
4848
extension MacroExpansionExprSyntax {
4949
/// Evaluate the given macro for this syntax node, producing the expanded
5050
/// result and (possibly) some diagnostics.
51-
func evaluateMacro(
51+
func evaluateMacro<Context: MacroExpansionContext>(
5252
_ macro: Macro.Type,
53-
in context: any MacroExpansionContext
53+
in context: Context
5454
) -> ExprSyntax {
5555
guard let exprMacro = macro as? ExpressionMacro.Type else {
5656
return ExprSyntax(self)
@@ -76,9 +76,9 @@ extension MacroExpansionExprSyntax {
7676
extension MacroExpansionDeclSyntax {
7777
/// Evaluate the given macro for this syntax node, producing the expanded
7878
/// result and (possibly) some diagnostics.
79-
func evaluateMacro(
79+
func evaluateMacro<Context: MacroExpansionContext>(
8080
_ macro: Macro.Type,
81-
in context: any MacroExpansionContext
81+
in context: Context
8282
) -> Syntax {
8383
// TODO: declaration/statement macros
8484

@@ -109,9 +109,9 @@ extension Syntax {
109109
/// This operation only makes sense when `evaluatedMacroName` produces a
110110
/// non-nil value, indicating that this syntax node is a macro evaluation of
111111
/// some kind.
112-
func evaluateMacro(
112+
func evaluateMacro<Context: MacroExpansionContext>(
113113
with macroSystem: MacroSystem,
114-
context: any MacroExpansionContext
114+
context: Context
115115
) -> Syntax {
116116
// If this isn't a macro evaluation node, do nothing.
117117
guard let macroName = evaluatedMacroName else {

0 commit comments

Comments
 (0)