External Issue: lambda declaration appears not to support throws clause

16580, “russel”, “lambda declaration appears not to support throws clause”, “2020-10-12T15:16:48Z”

The file:

var f = lambda (n:int): int { return 1; };

compiles fine. However, this would not allow for exceptions to be propagated out. Whilst a proc definition can have a throws clause, it seems that lambda definitions do not support this. The files:

var f = lambda (n:int): int throws { return 1; };
var f = lambda (n:int): throws int { return 1; };

lead to the error message:

chpl -o lambda_throws_first lambda_throws_first.chpl