for i, node in toSeq(prc.getType)[2..^1]: #error
let isRef = node.kind == nnkBracketExpr and $node[0] == "ref"
let isServer = node.kind == nnkBracketExpr and $node[0] == "ref"
and (
serverKind == ServerKind.Tcp and $node[1] ==
"TcpServer:ObjectType" or
serverKind == ServerKind.Udp and $node[1] ==
"UdpServer:ObjectType"
)
Full error message:
_type mismatch: got (char)_
_but expected one of:_
_proc myProc(a: string; b: TcpServer)_
Removing either isRef or isServer gets a rid of the error.
Writing it in a different way to get the same result returns the same error.
Any idea how to make it work? I don't think the rest of code matters in this
case.