Skip to content

Commit ebb2e68

Browse files
committed
[AST] Add accessor to re-build parameter with new label
1 parent d048df2 commit ebb2e68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/swift/AST/Types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,6 +2885,10 @@ class AnyFunctionType : public TypeBase {
28852885

28862886
Param getWithoutLabel() const { return Param(Ty, Identifier(), Flags); }
28872887

2888+
Param withLabel(Identifier newLabel) const {
2889+
return Param(Ty, newLabel, Flags);
2890+
}
2891+
28882892
Param withType(Type newType) const { return Param(newType, Label, Flags); }
28892893

28902894
Param withFlags(ParameterTypeFlags flags) const {

0 commit comments

Comments
 (0)