summary refs log tree commit diff stats
path: root/tests/accept/compile
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2010-12-13 07:58:35 +0100
committerAraq <rumpf_a@web.de>2010-12-13 07:58:35 +0100
commit63ac32e6de018b5e175efb6f61675bfe36394973 (patch)
tree5e95795798ccdadecdbfaa8340d7382eae8ee9be /tests/accept/compile
parente7fe8edab39884f59d685d2608f8bd944cad27e6 (diff)
downloadNim-63ac32e6de018b5e175efb6f61675bfe36394973.tar.gz
bugfix: multiple yield statements and loop body vars
Diffstat (limited to 'tests/accept/compile')
-rw-r--r--tests/accept/compile/toop.nim18
-rwxr-xr-xtests/accept/compile/tquicksort.nim4
2 files changed, 21 insertions, 1 deletions
diff --git a/tests/accept/compile/toop.nim b/tests/accept/compile/toop.nim
new file mode 100644
index 000000000..d103c6304
--- /dev/null
+++ b/tests/accept/compile/toop.nim
@@ -0,0 +1,18 @@
+
+type
+  TA = object
+    x, y: int
+  
+  TB = object of TA
+    z: int
+    
+  TC = object of TB
+    whatever: string
+  
+proc p(a: var TA) = nil
+proc p(b: var TB) = nil
+
+var c: TC
+
+p(c)
+
diff --git a/tests/accept/compile/tquicksort.nim b/tests/accept/compile/tquicksort.nim
index 421564ecd..6706a185e 100755
--- a/tests/accept/compile/tquicksort.nim
+++ b/tests/accept/compile/tquicksort.nim
@@ -9,7 +9,9 @@ proc QuickSort(list: seq[int]): seq[int] =
             left.add(list[i])
         elif list[i] > pivot:
             right.add(list[i])
-    result = QuickSort(left) & pivot & QuickSort(right)
+    result = QuickSort(left) & 
+      pivot & 
+      QuickSort(right)
     
 proc echoSeq(a: seq[int]) =
     for i in low(a)..high(a):