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

@ -51,8 +51,7 @@ const
wImportcpp, wImportobjc, wError} wImportcpp, wImportobjc, wError}
varPragmas* = {wImportc, wExportc, wVolatile, wRegister, wThreadVar, wNodecl, varPragmas* = {wImportc, wExportc, wVolatile, wRegister, wThreadVar, wNodecl,
wMagic, wHeader, wDeprecated, wCompilerProc, wDynLib, wExtern, wMagic, wHeader, wDeprecated, wCompilerProc, wDynLib, wExtern,
wImportcpp, wImportobjc, wError, wNoInit, wCompileTime, wGlobal, wImportcpp, wImportobjc, wError, wNoInit, wCompileTime, wGlobal}
wByCopy}
constPragmas* = {wImportc, wExportc, wHeader, wDeprecated, wMagic, wNodecl, constPragmas* = {wImportc, wExportc, wHeader, wDeprecated, wMagic, wNodecl,
wExtern, wImportcpp, wImportobjc, wError} wExtern, wImportcpp, wImportobjc, wError}
letPragmas* = varPragmas letPragmas* = varPragmas

View file

@ -5,8 +5,8 @@ discard """
import events import events
type type
TProperty*[T] = object of TObject TProperty*[T] = object of TObject
getProc: proc(property: TProperty[T]): T getProc: proc(property: TProperty[T]): T {.nimcall.}
setProc: proc(property: var TProperty[T], value: T) setProc: proc(property: var TProperty[T], value: T) {.nimcall.}
value: T value: T
ValueChanged*: TEventHandler ValueChanged*: TEventHandler
Binders: seq[TProperty[T]] Binders: seq[TProperty[T]]

View file

@ -5,7 +5,7 @@ type
v: TV v: TV
PDict[TK, TV] = ref TDict[TK, 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 nil
proc destroyDict[TK, TV](a: PDict[TK, TV]) = proc destroyDict[TK, TV](a: PDict[TK, TV]) =

View file

@ -1,5 +1,5 @@
proc foo[T](thing: T) = proc foo[T](thing: T) =
discard thing discard thing
var a: proc (thing: int) = foo[int] var a: proc (thing: int) {.nimcall.} = foo[int]

View file

@ -1,8 +1,8 @@
type type
TProperty[T] = object of TObject TProperty[T] = object of TObject
getProc: proc(property: TProperty[T]): T getProc: proc(property: TProperty[T]): T {.nimcall.}
setProc: proc(property: TProperty[T], value: T) setProc: proc(property: TProperty[T], value: T) {.nimcall.}
value: T value: T
proc newProperty[T](value: TObject): TProperty[T] = proc newProperty[T](value: TObject): TProperty[T] =

View file

@ -6,7 +6,6 @@ version 0.9.0
New pragmas: New pragmas:
- ``hoist`` pragma for loop hoisting - ``hoist`` pragma for loop hoisting
- fix & document ``byCopy`` pragma
- document destructors - document destructors
- ``borrow`` needs to take type classes into account - ``borrow`` needs to take type classes into account
@ -95,6 +94,7 @@ Low priority
------------ ------------
- change how comments are part of the AST - change how comments are part of the AST
- fix & document ``byCopy`` pragma
- ``with proc `+`(x, y: T): T`` for generic code - ``with proc `+`(x, y: T): T`` for generic code
- new feature: ``distinct T with operations`` - new feature: ``distinct T with operations``
- implement the "easy" constructors idea - implement the "easy" constructors idea