M2
M2 copied to clipboard
multi-line functions break generateAssertions
Unless this test was edited manually, I believe at some point generateAssertions supported multiline functions in its input, but now it is broken:
i1 : generateAssertions ///
f = x -> (
x + x)
f(1)
///
o1 =
assert( (try f = x -> ( else oops) === oops );
assert( (try x + x) else oops) === oops );
assert( (try f(1) else oops) === oops );