summary refs log tree commit diff stats
path: root/compiler/magicsys.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/magicsys.nim')
-rw-r--r--compiler/magicsys.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/magicsys.nim b/compiler/magicsys.nim
index b365a3a19..1ec6b9a69 100644
--- a/compiler/magicsys.nim
+++ b/compiler/magicsys.nim
@@ -35,7 +35,7 @@ proc getSysMagic*(g: ModuleGraph; info: TLineInfo; name: string, m: TMagic): PSy
   for r in systemModuleSyms(g, id):
     if r.magic == m:
       # prefer the tyInt variant:
-      if r.typ[0] != nil and r.typ[0].kind == tyInt: return r
+      if r.typ.returnType != nil and r.typ.returnType.kind == tyInt: return r
       result = r
   if result != nil: return result
   localError(g.config, info, "system module needs: " & name)