@monster Why not use inheritance?
type
ThreadID* = distinct uint8
AnyMsg = object {.inheritable.}
sender*: ThreadID
receiver*: ThreadID
previous: ptr[AnyMsg]
Msg*[T] = object of AnyMsg
content*: T
let space = alloc0(sizeof(Msg[int]))
let m = cast[ptr[Msg[int]]](space)
let p: ptr[AnyMsg] = m.previous
- Pointer to generic type with unspecified generic parameter? monster
- Re: Pointer to generic type with unspecified generic par... Udiknedormin
