From 5985355028536093bf30fa94d895ac83c7514ba7 Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Mon, 28 Oct 2024 17:16:28 -0700 Subject: [PATCH] Fix build issues --- Sources/SwiftFormat/Rules/UseShorthandTypeNames.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/SwiftFormat/Rules/UseShorthandTypeNames.swift b/Sources/SwiftFormat/Rules/UseShorthandTypeNames.swift index 67a8d8aa..a0c32241 100644 --- a/Sources/SwiftFormat/Rules/UseShorthandTypeNames.swift +++ b/Sources/SwiftFormat/Rules/UseShorthandTypeNames.swift @@ -48,7 +48,7 @@ public final class UseShorthandTypeNames: SyntaxFormatRule { switch node.name.text { case "Array": guard let argument = genericArgumentList.firstAndOnly, - case .type(let typeArgument) = argument else { + case .type(let typeArgument) = argument.argument else { newNode = nil break } @@ -62,7 +62,7 @@ public final class UseShorthandTypeNames: SyntaxFormatRule { case "Dictionary": guard let arguments = exactlyTwoChildren(of: genericArgumentList), case .type(let type0Argument) = arguments.0.argument, - caes .type(let type1Argument) = arguments.1.argument else { + case .type(let type1Argument) = arguments.1.argument else { newNode = nil break } @@ -79,7 +79,7 @@ public final class UseShorthandTypeNames: SyntaxFormatRule { break } guard let argument = genericArgumentList.firstAndOnly, - case .type(let typeArgument) = argument else { + case .type(let typeArgument) = argument.argument else { newNode = nil break } @@ -143,7 +143,7 @@ public final class UseShorthandTypeNames: SyntaxFormatRule { switch expression.baseName.text { case "Array": guard let argument = genericArgumentList.firstAndOnly, - case .type(let typeArgument) = argument else { + case .type(let typeArgument) = argument.argument else { newNode = nil break } @@ -172,7 +172,7 @@ public final class UseShorthandTypeNames: SyntaxFormatRule { case "Optional": guard let argument = genericArgumentList.firstAndOnly, - case .type(let typeArgument) = argument else { + case .type(let typeArgument) = argument.argument else { newNode = nil break }