bugfix: type alias to generic; generic type not stripped away from for loop variable
This commit is contained in:
parent
0e22a51095
commit
7405278138
8 changed files with 118 additions and 69 deletions
12
tests/compile/tgenericprop.nim
Normal file
12
tests/compile/tgenericprop.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
type
|
||||
TProperty[T] = object of TObject
|
||||
getProc: proc(property: TProperty[T]): T
|
||||
setProc: proc(property: TProperty[T], value: T)
|
||||
value: T
|
||||
|
||||
proc newProperty[T](value: TObject): TProperty[T] =
|
||||
result.getProc = proc (property: TProperty[T]) =
|
||||
return property.value
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue