Wrong type inferred for closure when returned from function #4929
Labels
A-type-system
Area: Type system
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
The above function gives a compile error:
mismatched types: expected
@fn(int) -> int
but found&fn(int) -> int
(expected @ closure, found & closure)If I change the expression syntax into an explicit return:
the code compiler (and runs) without error.
The text was updated successfully, but these errors were encountered: