diff options
author | jcosborn <jcosborn@users.noreply.github.com> | 2018-11-07 01:40:00 -0600 |
---|---|---|
committer | Arne Döring <arne.doering@gmx.net> | 2018-11-07 08:40:00 +0100 |
commit | fc740c54ec7af592ff3486c8cc296bb4f65eb340 (patch) | |
tree | 39371244479812cbe256d26192a551bc4c376c8b /compiler | |
parent | b9cdad74979b6581e0100440a1e565fa48d27d3c (diff) | |
download | Nim-fc740c54ec7af592ff3486c8cc296bb4f65eb340.tar.gz |
fixes #9600 (#9601)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/vmdeps.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/vmdeps.nim b/compiler/vmdeps.nim index 8aac5fb87..f160a3096 100644 --- a/compiler/vmdeps.nim +++ b/compiler/vmdeps.nim @@ -157,7 +157,10 @@ proc mapTypeToAstX(cache: IdentCache; t: PType; info: TLineInfo; of tyObject: if inst: result = newNodeX(nkObjectTy) - result.add t.sym.ast[2][0].copyTree # copy object pragmas + if t.sym.ast != nil: + result.add t.sym.ast[2][0].copyTree # copy object pragmas + else: + result.add newNodeI(nkEmpty, info) if t.sons[0] == nil: result.add newNodeI(nkEmpty, info) else: # handle parent object |