summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-01-25 14:24:33 +0100
committerAraq <rumpf_a@web.de>2014-01-25 14:24:33 +0100
commitf16881ad162a12833aba7598d65684d9e63600c2 (patch)
treeffded6fe903735525a0554d7e00dd5d12ac1628c
parent9d4c4592fa49aa1b571a158025ae3a7155b2414b (diff)
downloadNim-f16881ad162a12833aba7598d65684d9e63600c2.tar.gz
disable internalError so that nimbuild compiles again
-rw-r--r--compiler/lambdalifting.nim2
-rw-r--r--compiler/semdestruct.nim5
-rw-r--r--lib/system.nim2
3 files changed, 7 insertions, 2 deletions
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim
index 01eb49463..00fa04556 100644
--- a/compiler/lambdalifting.nim
+++ b/compiler/lambdalifting.nim
@@ -655,6 +655,8 @@ proc transformOuterProc(o: POuterContext, n: PNode): PNode =
         # consider: [i1, i2, i1]  Since we merged the iterator's closure
         # with the captured owning variables, we need to generate the
         # closure generation code again:
+        #if local == o.fn: message(n.info, errRecursiveDependencyX, local.name.s)
+        # XXX why doesn't this work?
         let createdVar = generateIterClosureCreation(o, closure,
                                                      closure.attachedNode)
         return makeClosure(local, createdVar, n.info)
diff --git a/compiler/semdestruct.nim b/compiler/semdestruct.nim
index 9dbbf2940..fb05826cb 100644
--- a/compiler/semdestruct.nim
+++ b/compiler/semdestruct.nim
@@ -116,7 +116,10 @@ proc generateDestructor(c: PContext, t: PType): PNode =
       let stmt = destroyField(c, t.n.sons[s].sym, destructedObj)
       if stmt != nil: addLine(stmt)
     else:
-      internalAssert false
+      # XXX just skip it for now so that the compiler doesn't crash, but
+      # please zahary fix it! arbitrary nesting of nkRecList/nkRecCase is
+      # possible. Any thread example seems to trigger this. 
+      discard
   # base classes' destructors will be automatically called by
   # semProcAux for both auto-generated and user-defined destructors
 
diff --git a/lib/system.nim b/lib/system.nim
index de23a71fa..09e44a45a 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1330,7 +1330,7 @@ iterator `||`*[S, T](a: S, b: T, annotation=""): T {.
   ## such isn't aware of the parallelism in your code! Be careful! Later
   ## versions of ``||`` will get proper support by Nimrod's code generator
   ## and GC.
-  nil
+  discard
 
 {.push stackTrace:off.}
 proc min*(x, y: int): int {.magic: "MinI", noSideEffect.} =