Open kidandcat opened 5 years ago
Is that a documentation/example bug?
I suppose yes, but if you tell me it should work without the typing.... I'm not sure if recv()
can infer the type from the variable you are assigning to.
If it's a doc bug, I'll fix it by PR.
Hmm, I don't remember Ormin's code base. :D Stay tuned.
So ... forumproto.nim contains this code:
client:
type Session = ref object
var gSessions: seq[Session]
gSessions = recv()
proc getAllSessions()
And to the best of my knowledge this test is green. recv()
here uses the seq[
of the previously type as defined in the type section ]
.
In the chat example you don't specify the type to
recv()
PD: it works if I use
recv(int)