reuse existing toHumanStr (#15674)

This commit is contained in:
Timothee Cour 2020-10-21 15:53:43 -07:00 • committed by GitHub
commit e09c259bf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -100,7 +100,7 @@ proc compileConstraints(p: PNode, result: var TPatternCode; conf: ConfigRef) =
# check all symkinds:
internalAssert conf, int(high(TSymKind)) < 255
for i in TSymKind:
if cmpIgnoreStyle(($i).substr(2), spec) == 0:
if cmpIgnoreStyle(i.toHumanStr, spec) == 0:
result.add(ppSymKind)
result.add(chr(i.ord))
return