Skip to content

Commit 285ce5b

Browse files
committed
-
1 parent 4e85a1f commit 285ce5b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Sources/PrincipleMacros/Syntax/Extensions/TypeSyntax.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,25 @@ extension GenericArgumentClauseSyntax {
114114
GenericArgumentClauseSyntax(
115115
arguments: GenericArgumentListSyntax(
116116
arguments.map { element in
117+
#if canImport(SwiftSyntax601)
118+
switch element.argument {
119+
case .type(let type):
120+
GenericArgumentSyntax(
121+
argument: .type(type.standardized),
122+
trailingComma: element.trailingComma?.trimmed.withTrailingSpace
123+
)
124+
default:
125+
GenericArgumentSyntax(
126+
argument: element.argument,
127+
trailingComma: element.trailingComma?.trimmed.withTrailingSpace
128+
)
129+
}
130+
#else
117131
GenericArgumentSyntax(
118132
argument: element.argument.standardized,
119133
trailingComma: element.trailingComma?.trimmed.withTrailingSpace
120134
)
135+
#endif
121136
}
122137
)
123138
)

0 commit comments

Comments
 (0)