mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
re-enable rodfiles tests; fixes #91
This commit is contained in:
@@ -53,7 +53,8 @@ proc genSingleVar(p: BProc, a: PNode) =
|
||||
var targetProc = p
|
||||
var immediateAsgn = a.sons[2].kind != nkEmpty
|
||||
if sfGlobal in v.flags:
|
||||
targetProc = p.module.preInitProc
|
||||
if v.owner.kind != skModule:
|
||||
targetProc = p.module.preInitProc
|
||||
assignGlobalVar(targetProc, v)
|
||||
genObjectInit(targetProc, cpsInit, v.typ, v.loc, true)
|
||||
else:
|
||||
|
||||
@@ -181,7 +181,12 @@ proc semTypeIdent(c: PContext, n: PNode): PSym =
|
||||
if result != nil:
|
||||
markUsed(n, result)
|
||||
if result.kind == skParam and result.typ.kind == tyTypeDesc:
|
||||
return result.typ.sons[0].sym
|
||||
# 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:
|
||||
return result.typ.sons[0].sym
|
||||
else:
|
||||
return result.typ.sym
|
||||
if result.kind != skType: GlobalError(n.info, errTypeExpected)
|
||||
if result.typ.kind != tyGenericParam:
|
||||
# XXX get rid of this hack!
|
||||
|
||||
Reference in New Issue
Block a user