Well then, why can't I specify proc's type instead of relying on type()?
    
    
    proc myProc(x: int): int = x + 1
    
    let f: proc(x: int): int = myProc
    
    let p: pointer = cast[pointer](myProc)
    let casted = cast[proc(x: int): int](p) #expression cannot be cast to 
proc(x: int): int{.closure.}
    

Reply via email to