mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 19:22:40 +00:00
made some tests green
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]]
|
||||
|
||||
@@ -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]) =
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
@@ -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] =
|
||||
|
||||
2
todo.txt
2
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
|
||||
|
||||
Reference in New Issue
Block a user