COBCH1818 Cannot be used with anonymous method

Syntax found in an anonymous method is illegal.

Resolution:

Correct the code; then recompile.

Example:

In the following example, the RETURNING RET STRING syntax is illegal and should be RETURNING RET TO STRING-ARRAY[0].

       class-id a.
       method-id main static.
           declare d as type System.Func[string]
           set d to
                delegate(params string-array as string occurs any returning ret as string
                     *>set ret to string-array[0]
                end-delegate
       end method.
       end class.