summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-07-17 08:44:04 +0200
committerAraq <rumpf_a@web.de>2012-07-17 08:44:04 +0200
commit19e57bf70dddecdd0834b06099c2fd5f8ee0ad9e (patch)
tree1236385442dc79b0fad9c915a5c5dc730aeea9da
parent526be8a4cfe7bddb16d3dcf4354e6695d7030a62 (diff)
downloadNim-19e57bf70dddecdd0834b06099c2fd5f8ee0ad9e.tar.gz
made some tests green
-rwxr-xr-xcompiler/pragmas.nim3
-rw-r--r--tests/compile/tdatabind.nim4
-rwxr-xr-xtests/compile/tdictdestruct.nim2
-rwxr-xr-xtests/compile/tgenericprocvar.nim2
-rw-r--r--tests/compile/tgenericprop.nim4
-rwxr-xr-xtodo.txt2
6 files changed, 8 insertions, 9 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index 348bf9bc6..7df477327 100755
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -51,8 +51,7 @@ const
     wImportcpp, wImportobjc, wError}
   varPragmas* = {wImportc, wExportc, wVolatile, wRegister, wThreadVar, wNodecl, 
     wMagic, wHeader, wDeprecated, wCompilerProc, wDynLib, wExtern,
-    wImportcpp, wImportobjc, wError, wNoInit, wCompileTime, wGlobal,
-    wByCopy}
+    wImportcpp, wImportobjc, wError, wNoInit, wCompileTime, wGlobal}
   constPragmas* = {wImportc, wExportc, wHeader, wDeprecated, wMagic, wNodecl,
     wExtern, wImportcpp, wImportobjc, wError}
   letPragmas* = varPragmas
diff --git a/tests/compile/tdatabind.nim b/tests/compile/tdatabind.nim
index b2e870d93..afa8aa47b 100644
--- a/tests/compile/tdatabind.nim
+++ b/tests/compile/tdatabind.nim
@@ -5,8 +5,8 @@ discard """
 import events
 type
   TProperty*[T] = object of TObject
-    getProc: proc(property: TProperty[T]): T
-    setProc: proc(property: var TProperty[T], value: T)
+    getProc: proc(property: TProperty[T]): T {.nimcall.}
+    setProc: proc(property: var TProperty[T], value: T) {.nimcall.}
     value: T
     ValueChanged*: TEventHandler
     Binders: seq[TProperty[T]]
diff --git a/tests/compile/tdictdestruct.nim b/tests/compile/tdictdestruct.nim
index 09e173b7c..ec1084105 100755
--- a/tests/compile/tdictdestruct.nim
+++ b/tests/compile/tdictdestruct.nim
@@ -5,7 +5,7 @@ type
     v: TV
   PDict[TK, TV] = ref TDict[TK, TV]
 
-proc fakeNew[T](x: var ref T, destroy: proc (a: ref T)) =
+proc fakeNew[T](x: var ref T, destroy: proc (a: ref T) {.nimcall.}) =
   nil
 
 proc destroyDict[TK, TV](a: PDict[TK, TV]) =
diff --git a/tests/compile/tgenericprocvar.nim b/tests/compile/tgenericprocvar.nim
index 7825db4c3..e642e3577 100755
--- a/tests/compile/tgenericprocvar.nim
+++ b/tests/compile/tgenericprocvar.nim
@@ -1,5 +1,5 @@
 proc foo[T](thing: T) =
     discard thing
 
-var a: proc (thing: int) = foo[int]
+var a: proc (thing: int) {.nimcall.} = foo[int]
 
diff --git a/tests/compile/tgenericprop.nim b/tests/compile/tgenericprop.nim
index 211fddecf..7cddf5617 100644
--- a/tests/compile/tgenericprop.nim
+++ b/tests/compile/tgenericprop.nim
@@ -1,8 +1,8 @@
 
 type
   TProperty[T] = object of TObject
-    getProc: proc(property: TProperty[T]): T
-    setProc: proc(property: TProperty[T], value: T)
+    getProc: proc(property: TProperty[T]): T {.nimcall.}
+    setProc: proc(property: TProperty[T], value: T) {.nimcall.}
     value: T
 
 proc newProperty[T](value: TObject): TProperty[T] =
diff --git a/todo.txt b/todo.txt
index 5aa3193fb..4fa8b999e 100755
--- a/todo.txt
+++ b/todo.txt
@@ -6,7 +6,6 @@ version 0.9.0
 
 New pragmas:
 - ``hoist`` pragma for loop hoisting
-- fix & document ``byCopy`` pragma
 - document destructors
 
 - ``borrow`` needs to take type classes into account
@@ -95,6 +94,7 @@ Low priority
 ------------
 
 - change how comments are part of the AST
+- fix & document ``byCopy`` pragma
 - ``with proc `+`(x, y: T): T`` for generic code
 - new feature: ``distinct T with operations``
 - implement the "easy" constructors idea