bugfix: subranges in generics properly detected
This commit is contained in:
parent
5c94a9e1ae
commit
170573a87f
1 changed files with 4 additions and 2 deletions
|
|
@ -141,6 +141,8 @@ proc SwapOperands(op: PNode) =
|
||||||
op.sons[2] = tmp
|
op.sons[2] = tmp
|
||||||
|
|
||||||
proc IsRange*(n: PNode): bool {.inline.} =
|
proc IsRange*(n: PNode): bool {.inline.} =
|
||||||
result = n.kind == nkInfix and n[0].kind == nkIdent and
|
if n.kind == nkInfix:
|
||||||
n[0].ident.id == ord(wDotDot)
|
if n[0].kind == nkIdent and n[0].ident.id == ord(wDotDot) or
|
||||||
|
n[0].kind == nkSymChoice and n[0][1].sym.name.id == ord(wDotDot):
|
||||||
|
result = true
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue