summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-08-31 13:59:25 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-08-31 13:59:25 +0200
commita08fb61da974e7384d63fd2e08f60c97594a01c6 (patch)
tree62d24a2bcc01e5753f364e50b2aa0cd0aa445c89 /compiler
parent4846e4e4527968c03fab745d7baaf6fb9ee8db4d (diff)
downloadNim-a08fb61da974e7384d63fd2e08f60c97594a01c6.tar.gz
make tests green again
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semexprs.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 63039b36d..65557658a 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -1085,9 +1085,11 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
       if ty.n != nil and ty.n.kind == nkRecList:
         let field = lookupInRecord(ty.n, i)
         if field != nil:
-          n.typ = newTypeWithSons(c, tyFieldAccessor, @[ty, field.typ])
-          n.typ.n = copyTree(n)
+          n.typ = makeTypeDesc(c, field.typ)
           return n
+          #n.typ = newTypeWithSons(c, tyFieldAccessor, @[ty, field.typ])
+          #n.typ.n = copyTree(n)
+          #return n
     else:
       tryReadingGenericParam(ty)
       return