diff options
author | Araq <rumpf_a@web.de> | 2017-02-16 01:43:12 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-02-16 01:43:12 +0100 |
commit | aebe9d7d13ab57b7ab335c60c8965111ceec51b0 (patch) | |
tree | f01f7680f77d0a864597bee35df6ea5e66fd91ba /compiler | |
parent | 97e26967f1f37a33edf6877cedfc9854fabab5eb (diff) | |
download | Nim-aebe9d7d13ab57b7ab335c60c8965111ceec51b0.tar.gz |
make more tests green
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semfold.nim | 5 | ||||
-rw-r--r-- | compiler/transf.nim | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/compiler/semfold.nim b/compiler/semfold.nim index 05e398c9a..7a65462ec 100644 --- a/compiler/semfold.nim +++ b/compiler/semfold.nim @@ -628,7 +628,10 @@ proc getConstExpr(m: PSym, n: PNode): PNode = of {skProc, skMethod}: result = n of skType: - result = newSymNodeTypeDesc(s, n.info) + # XXX gensym'ed symbols can come here and cannot be resolved. This is + # dirty, but correct. + if s.typ != nil: + result = newSymNodeTypeDesc(s, n.info) of skGenericParam: if s.typ.kind == tyStatic: if s.typ.n != nil: diff --git a/compiler/transf.nim b/compiler/transf.nim index cbd1f15e3..2103d48bf 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -869,10 +869,12 @@ proc transform(c: PTransf, n: PNode): PTransNode = else: result = transformSons(c, n) of nkIdentDefs, nkConstDef: - result = n.PTransNode - #transformSons(c, n) - let L = n.len-1 - result[L] = transform(c, n.sons[L]) + when true: + result = transformSons(c, n) + else: + result = n.PTransNode + let L = n.len-1 + result[L] = transform(c, n.sons[L]) # XXX comment handling really sucks: if importantComments(): PNode(result).comment = n.comment |