made some tests green

This commit is contained in:
Araq 2012-07-17 08:44:04 +02:00
commit 19e57bf70d
6 changed files with 8 additions and 9 deletions

View file

@ -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]]

View file

@ -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]) =

View file

@ -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]

View file

@ -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] =