Skip to content

Commit

Permalink
make nimforum compile again
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Dec 31, 2016
1 parent f6c2c4a commit bf8f00f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/sighashes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import ast, md5
from hashes import Hash
from astalgo import debug
from types import typeToString
from types import typeToString, preferDesc
from strutils import startsWith, contains

when false:
Expand Down Expand Up @@ -185,12 +185,15 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) =
if sfAnon in t.sym.flags:
# generated object names can be identical, so we need to
# disambiguate furthermore by hashing the field types and names:
# mild hack to prevent endless recursions (makes nimforum compile again):
excl t.sym.flags, sfAnon
let n = t.n
for i in 0 ..< n.len:
assert n[i].kind == nkSym
let s = n[i].sym
c.hashSym s
c.hashType s.typ, flags
incl t.sym.flags, sfAnon
else:
c &= t.id
if t.len > 0 and t.sons[0] != nil:
Expand Down
1 change: 1 addition & 0 deletions tests/async/tupcoming_async.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
discard """
cmd: "nim c -r -f $file"
output: '''
OK
OK
Expand Down

0 comments on commit bf8f00f

Please sign in to comment.