Skip to content

Commit 02a53d0

Browse files
committed
[Macros] Correct the where clause syntax type in ConformanceMacro.
1 parent a3caacd commit 02a53d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/ASTGen/Sources/ASTGen/Macros.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ func expandAttachedMacroInProcess(
752752
// the existential.
753753
func expandConformanceMacro<Node: DeclGroupSyntax>(
754754
_ node: Node
755-
) throws -> [(TypeSyntax, WhereClauseSyntax?)] {
755+
) throws -> [(TypeSyntax, GenericWhereClauseSyntax?)] {
756756
return try attachedMacro.expansion(
757757
of: sourceManager.detach(
758758
customAttrNode,

test/Macros/Inputs/syntax_macro_definitions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ public struct EquatableMacro: ConformanceMacro {
10181018
of node: AttributeSyntax,
10191019
providingConformancesOf decl: some DeclGroupSyntax,
10201020
in context: some MacroExpansionContext
1021-
) throws -> [(TypeSyntax, WhereClauseSyntax?)] {
1021+
) throws -> [(TypeSyntax, GenericWhereClauseSyntax?)] {
10221022
let protocolName: TypeSyntax = "Equatable"
10231023
return [(protocolName, nil)]
10241024
}

0 commit comments

Comments
 (0)