@@ -48,9 +48,9 @@ extension SyntaxProtocol {
48
48
extension MacroExpansionExprSyntax {
49
49
/// Evaluate the given macro for this syntax node, producing the expanded
50
50
/// result and (possibly) some diagnostics.
51
- func evaluateMacro(
51
+ func evaluateMacro< Context : MacroExpansionContext > (
52
52
_ macro: Macro . Type ,
53
- in context: any MacroExpansionContext
53
+ in context: Context
54
54
) -> ExprSyntax {
55
55
guard let exprMacro = macro as? ExpressionMacro . Type else {
56
56
return ExprSyntax ( self )
@@ -76,9 +76,9 @@ extension MacroExpansionExprSyntax {
76
76
extension MacroExpansionDeclSyntax {
77
77
/// Evaluate the given macro for this syntax node, producing the expanded
78
78
/// result and (possibly) some diagnostics.
79
- func evaluateMacro(
79
+ func evaluateMacro< Context : MacroExpansionContext > (
80
80
_ macro: Macro . Type ,
81
- in context: any MacroExpansionContext
81
+ in context: Context
82
82
) -> Syntax {
83
83
// TODO: declaration/statement macros
84
84
@@ -109,9 +109,9 @@ extension Syntax {
109
109
/// This operation only makes sense when `evaluatedMacroName` produces a
110
110
/// non-nil value, indicating that this syntax node is a macro evaluation of
111
111
/// some kind.
112
- func evaluateMacro(
112
+ func evaluateMacro< Context : MacroExpansionContext > (
113
113
with macroSystem: MacroSystem ,
114
- context: any MacroExpansionContext
114
+ context: Context
115
115
) -> Syntax {
116
116
// If this isn't a macro evaluation node, do nothing.
117
117
guard let macroName = evaluatedMacroName else {
0 commit comments