From bf8f00f717467849ef16ed7829feff9f62780123 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 31 Dec 2016 11:37:35 +0100 Subject: [PATCH] make nimforum compile again --- compiler/sighashes.nim | 5 ++++- tests/async/tupcoming_async.nim | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/sighashes.nim b/compiler/sighashes.nim index fd2f444a69..4883479fa9 100644 --- a/compiler/sighashes.nim +++ b/compiler/sighashes.nim @@ -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: @@ -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: diff --git a/tests/async/tupcoming_async.nim b/tests/async/tupcoming_async.nim index 7d255f2133..9cdc6fd0aa 100644 --- a/tests/async/tupcoming_async.nim +++ b/tests/async/tupcoming_async.nim @@ -1,4 +1,5 @@ discard """ + cmd: "nim c -r -f $file" output: ''' OK OK