c3c
c3c copied to clipboard
inference doesn't work through && in lambdas
the line Callback *f = &&(fn void() { }); yields the error:
12: fn void main() {
13: Callback *f = &&(fn void() { });
^^^^^^^^^^^^^^^^^
(/home/user/c3/main.c3:13:17) Error: Implicitly casting 'fn void()*' to 'Callback*' (fn String()*) is not permitted, but you may do an explicit cast by placing '(Callback*)' before the expression.
but it compiles and runs correctly when doing Callback *f = &&((Callback) fn void() { });