> The code tries to pass a parameter with the wrong type to that proc, yes. But > the compiler doesn't even get that far:
I'm not sure about that. So with having just one body or no conflicts you would
expect a type error? But this compiles and works just fine:
import future
proc takesFunc(f: () -> void) =
echo "running f()"
f()
echo "done running f()"
takesFunc do:
var x = 1
echo x
takesFunc do:
var y = 2
echo y
Output:
running f()
1
done running f()
running f()
2
done running f()
