COBCH1816 Anonymous method can only be used where a suitable delegate type can be inferred.

The program contains an anonymous method used in a context other than that which can be mapped onto a suitable delegate type. This is not allowed.

Resolution:

Correct the code such that the anonymous method is used, for example, as a source in a MOVE or SET statement where the target is an object of delegate type, or where it is used as an argument to a method that expects a delegate type; then recompile.

Example:

In the following example, the anonymouse display method is not mapped onto a suitable delegate type, but uses a literal instead.

         display 
               delegate
                   display "Hello"
               end-delegate