The function:
proc iterative_f(n:int): bigint throws return iterative(n);
compiles fine and does what is expected of it. In particular:
const functions = (iterative_f,);
does as expected.
However,
const functions = (
lambda (n:int): bigint throws { return iterative(n); },
);
fails with:
test/Factorial_Chapel_Test.chpl:24: syntax error: near 'throws'
Removing the throws
from the lambda
allows for compilation but the exception is not propagated as required for the tests to work.