summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xlib/system.nim4
-rwxr-xr-xtodo.txt11
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 6eb6b3996..9968cd49d 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2189,7 +2189,7 @@ template doAssert*(cond: expr, msg = "") =
       raiseAssert(astToStr(cond) & ' ' & msg)
 
 
-proc shallow*[T](s: seq[T]) {.noSideEffect, inline.} =
+proc shallow*[T](s: var seq[T]) {.noSideEffect, inline.} =
   ## marks a sequence `s` as `shallow`:idx:. Subsequent assignments will not
   ## perform deep copies of `s`. This is only useful for optimization 
   ## purposes.
@@ -2197,7 +2197,7 @@ proc shallow*[T](s: seq[T]) {.noSideEffect, inline.} =
     var s = cast[PGenericSeq](s)
     s.reserved = s.reserved or seqShallowFlag
 
-proc shallow*(s: string) {.noSideEffect, inline.} =
+proc shallow*(s: var string) {.noSideEffect, inline.} =
   ## marks a string `s` as `shallow`:idx:. Subsequent assignments will not
   ## perform deep copies of `s`. This is only useful for optimization 
   ## purposes.
diff --git a/todo.txt b/todo.txt
index 1d4423de3..3269b7fb5 100755
--- a/todo.txt
+++ b/todo.txt
@@ -160,8 +160,17 @@ Version 2
   issues can "easily" dealt with by ensuring:
   
     var x = myProc() # checks myProc() initializes every pointer explicitely
+
+- guards for the 'case' statement; generalized case statement;
+  a guard looks like: 
+  
+    case x
+    of nkStmtList if x.value == 0: 
+  
+  a generalized case statement looks like:
     
-- generalized case statement (requires better transf)
+    case x with `=~`
+      
 - rethink the syntax: distinction between expr and stmt is unfortunate; 
   indentation handling is quite complex too; problem with exception handling
   is that often the scope of ``try`` is wrong and apart from that ``try`` is