I have the following type:
SystemFunctionCall[F,X,V] = proc(f: F, xl: X): V {.inline.}
And the following type containing it:
Statement = ref object
pos: int
case kind: StatementKind:
of commandStatement:
code : int
#call : SystemFunctionCall[SystemFunction,ExpressionList,Value]
arguments : ExpressionList
of callStatement:
id : int
expressions : ExpressionList
of assignmentStatement:
symbol : int
rValue : Statement
of expressionStatement:
expression : Expression
I'm also exporting a variable of Statement type.
However, the compiler seems to have a problem with my SystemFunctionCall -type field.
Any workarounds?
I think, when you are using generics inside an object, than the object may need generics as well, so maybe try something like Statement[SystemFunction,ExpressionList,Value] = ref object ?
Just a guess.