Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Generator/Sources/CLI/Glob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ final class Glob: Collection {
let includeDirectories = behavior.includesDirectoriesInResults

for i in 0..<Int(gt.gl_matchc) {
if let path = String(validatingUTF8: gt.gl_pathv[i]!) {
if let path = String(validatingCString: gt.gl_pathv[i]!) {
if !includeFiles || !includeDirectories {
let isDirectory = self.isDirectory(path: path)
if (!includeFiles && !isDirectory) || (!includeDirectories && isDirectory) {
Expand Down
2 changes: 1 addition & 1 deletion Generator/Sources/Internal/GeneratorHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct GeneratorHelper {
private static func openNestedClosure(for method: Method) -> 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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extension SyntaxProtocol {
)
)
}
return identifierType.as(Self.self)!
return Self.init(identifierType) ?? mutableSelf
} else {
return mutableSelf
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down
2 changes: 1 addition & 1 deletion Generator/Sources/Internal/Tokens/ComplexType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down
Loading