so, i have a problem i've got from this code:
type item[T] = object
value: any
next: ptr any
>next is ptr any cause i dont wanna write smth like >next: ptr item[any]. i'm
>afraid of gettin error about auto in contexts. can i get an object with
>pointer on other with non-same type? like that
var i: item[int] #actually there is error: Error: invalid type: 'auto' in
this context: 'item[system.int]'. AND YES I KNOW: VALUE: T and NEXT: ptr
item[T]/T will work
var tmp: item[string]
i.value = 3
i.next = addr(tmp)
...
or its impossible in that way?
and the second problem is: how can i transfer a pointer on proc to other proc?
example:
proc a(p: ptr proc) {.procvar.} =
...
a(addr(`<`))
i've got error >Expression has no address. (on other comp i've got msg that
proc is not procvar, lol) help me resolve THOSE PROBLEMS PLEASE AAAAAA