Why calling a lambda in expressions causes an error
xbyte3 opened this issue · 2 comments
xbyte3 commented
Code:
const A = function() {
return 1
}
B = A() # <- Error: Cannot use void in expression position
Why calling a lambda in expressions causes an error "Cannot use void in expression position"? I think this is a bug.
thegrb93 commented
I'm guessing it's because your function doesn't have a return type?
Denneisk commented
Lambda calls require using a type designator. Just how it was made.