diff --git a/Generator/Sources/CLI/Glob.swift b/Generator/Sources/CLI/Glob.swift index 44afbd78..19516744 100644 --- a/Generator/Sources/CLI/Glob.swift +++ b/Generator/Sources/CLI/Glob.swift @@ -153,7 +153,7 @@ final class Glob: Collection { let includeDirectories = behavior.includesDirectoriesInResults for i in 0.. String { var fullString = "" for (index, parameter) in method.signature.parameters.enumerated() { - if !parameter.type.containsAttribute(named: "@escaping"), let closure = parameter.type.findClosure() { + if !parameter.type.containsAttribute(named: "@escaping"), parameter.type.findClosure() != nil { if fullString.isEmpty { fullString = "\n" } diff --git a/Generator/Sources/Internal/Helpers/SwiftSyntax+convenience.swift b/Generator/Sources/Internal/Helpers/SwiftSyntax+convenience.swift index 61d214bb..326422ef 100644 --- a/Generator/Sources/Internal/Helpers/SwiftSyntax+convenience.swift +++ b/Generator/Sources/Internal/Helpers/SwiftSyntax+convenience.swift @@ -44,7 +44,7 @@ extension SyntaxProtocol { ) ) } - return identifierType.as(Self.self)! + return Self.init(identifierType) ?? mutableSelf } else { return mutableSelf } diff --git a/Generator/Sources/Internal/Tokens/Capabilities/HasGenerics.swift b/Generator/Sources/Internal/Tokens/Capabilities/HasGenerics.swift index 1d385205..e1b2d390 100644 --- a/Generator/Sources/Internal/Tokens/Capabilities/HasGenerics.swift +++ b/Generator/Sources/Internal/Tokens/Capabilities/HasGenerics.swift @@ -50,8 +50,8 @@ extension HasGenerics { "genericArguments": genericArgumentsString, "hasPrimaryAssociatedTypes": hasPrimaryAssociatedTypes, "hasOnlyPrimaryAssociatedTypes": hasOnlyPrimaryAssociatedTypes, - "genericProtocolIdentity": genericProtocolIdentity, - "genericPrimaryAssociatedTypeArguments": genericPrimaryAssociatedTypeArguments, + "genericProtocolIdentity": genericProtocolIdentity as Any, + "genericPrimaryAssociatedTypeArguments": genericPrimaryAssociatedTypeArguments as Any, ] .compactMapValues { $0 } } diff --git a/Generator/Sources/Internal/Tokens/ComplexType.swift b/Generator/Sources/Internal/Tokens/ComplexType.swift index 67fbe976..b36fdaf6 100644 --- a/Generator/Sources/Internal/Tokens/ComplexType.swift +++ b/Generator/Sources/Internal/Tokens/ComplexType.swift @@ -20,7 +20,7 @@ enum ComplexType { self = .attributed( attributes: [ attributedType.attributes.map { $0.trimmedDescription }, - attributedType.specifier.map { [$0.trimmedDescription] } ?? [], + attributedType.specifiers.map { $0.trimmedDescription }, ].flatMap { $0 }, baseType: ComplexType(syntax: attributedType.baseType) )