Fix crash when parsing apple/swift (#4828)
This commit is contained in:
parent
7dad240ea7
commit
6a09af169e
|
@ -66,7 +66,7 @@ private extension GenericTypeNameRule {
|
||||||
|
|
||||||
override func visitPost(_ node: GenericParameterSyntax) {
|
override func visitPost(_ node: GenericParameterSyntax) {
|
||||||
let name = node.name.text
|
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)
|
let allowedSymbols = configuration.allowedSymbols.union(.alphanumerics)
|
||||||
if !allowedSymbols.isSuperset(of: CharacterSet(charactersIn: name)) {
|
if !allowedSymbols.isSuperset(of: CharacterSet(charactersIn: name)) {
|
||||||
|
|
Loading…
Reference in New Issue