mirror of
https://github.com/github/semantic.git
synced 2024-11-29 11:02:26 +03:00
Handle the zero-category case with a where clause.
This commit is contained in:
parent
4bcc773fc6
commit
ba650f8080
@ -18,10 +18,10 @@ public enum Info: AlgebraicHashable, CustomDebugStringConvertible {
|
||||
|
||||
public var debugDescription: String {
|
||||
switch self {
|
||||
case let .Literal(s, c) where c.isEmpty:
|
||||
return s
|
||||
case let .Literal(s, c):
|
||||
return c.isEmpty
|
||||
? s
|
||||
: s + " (" + c.map { String(reflecting: $0) }.joinWithSeparator(", ") + ")"
|
||||
return s + " (" + c.map { String(reflecting: $0) }.joinWithSeparator(", ") + ")"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user