Fix crash when parsing apple/swift (#4828)

This commit is contained in:
Martin Redington 2023-03-31 19:59:47 +01:00 committed by GitHub
parent 7dad240ea7
commit 6a09af169e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ private extension GenericTypeNameRule {
override func visitPost(_ node: GenericParameterSyntax) {
let name = node.name.text
guard !configuration.shouldExclude(name: name) else { return }
guard !name.isEmpty, !configuration.shouldExclude(name: name) else { return }
let allowedSymbols = configuration.allowedSymbols.union(.alphanumerics)
if !allowedSymbols.isSuperset(of: CharacterSet(charactersIn: name)) {