mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-16 22:11:18 +00:00
fixes iterating over enums
This commit is contained in:
@@ -236,11 +236,11 @@ proc semTypeIdent(c: PContext, n: PNode): PSym =
|
||||
markUsed(n, result)
|
||||
if result.kind == skParam and result.typ.kind == tyTypeDesc:
|
||||
# This is a typedesc param. is it already bound?
|
||||
# it's not bound when it's also used as return type for example
|
||||
if result.typ.sonsLen > 0:
|
||||
# it's not bound when it's used multiple times in the
|
||||
# proc signature for example
|
||||
if c.InGenericInst > 0:
|
||||
let bound = result.typ.sons[0].sym
|
||||
if bound != nil:
|
||||
return bound
|
||||
if bound != nil: return bound
|
||||
return result
|
||||
if result.typ.sym == nil:
|
||||
LocalError(n.info, errTypeExpected)
|
||||
|
||||
Reference in New Issue
Block a user