summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2016-11-01 07:16:07 +0100
committerAraq <rumpf_a@web.de>2016-11-01 07:16:07 +0100
commit65801e4b6ed143fba3284a580a71582a7a361061 (patch)
treef0dcc4d93d2bfdb6ddb8ada0741add7fe87d6f21
parent45c6f9bb69b9b7250ea74dfb0d8b01c260e28caf (diff)
downloadNim-65801e4b6ed143fba3284a580a71582a7a361061.tar.gz
make tests green again
-rw-r--r--compiler/magicsys.nim2
-rw-r--r--compiler/nimconf.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/magicsys.nim b/compiler/magicsys.nim
index f47dba1bf..6a9d69082 100644
--- a/compiler/magicsys.nim
+++ b/compiler/magicsys.nim
@@ -54,7 +54,7 @@ proc getSysMagic*(name: string, m: TMagic): PSym =
     if r.kind == skStub: loadStub(r)
     if r.magic == m:
       # prefer the tyInt variant:
-      if r.typ.sons[0].kind == tyInt: return r
+      if r.typ.sons[0] != nil and r.typ.sons[0].kind == tyInt: return r
       result = r
     r = nextIdentIter(ti, systemModule.tab)
   if result != nil: return result
diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim
index eb3e4d03f..4bf2fbc9a 100644
--- a/compiler/nimconf.nim
+++ b/compiler/nimconf.nim
@@ -179,7 +179,7 @@ proc parseAssignment(L: var TLexer, tok: var TToken) =
     if tok.tokType == tkBracketRi: confTok(L, tok)
     else: lexMessage(L, errTokenExpected, "']'")
     add(val, ']')
-  let percent = tok.ident.s == "%="
+  let percent = tok.ident != nil and tok.ident.s == "%="
   if tok.tokType in {tkColon, tkEquals} or percent:
     if len(val) > 0: add(val, ':')
     confTok(L, tok)           # skip ':' or '=' or '%'