Sorry for not replying so soon and thanks for the responces. However, this 
doesn't seem to be a problem with discard since I can replace the discard to 
echo to generate the same error.
    
    
    proc add(x,y:int):int= x+y
    
    echo add 1, 2 #=> Error: type mismatch: got <int literal(1)>
    echo (add 1, 2) #=> Error: type mismatch: got <int literal(1)>
    
    

>From a noob's point of view, this appears like a kind of inappropriate lexical 
>analysis; the `echo add 1, 2` or `echo (add 1,2)` should be analized as `echo 
>(add(1,2))` since `add` takes two arguments. In reality, it seems to be 
>analized as `echo (add(1),2)`. 

Reply via email to