Lambda error: description

Either a hoisting error or a code restriction occurred within the body of the lambda function. A lambda function cannot contain any of the following:

This error also occurs if a data division can’t be created in the generated method or if an inline lambda is used in the initial value for a non‑local, non‑class field.