COBCH1855 SYNC statement cannot specify a value type

The program contains a SYNC statement that refers to a reference type instead of a value type. This is not allowed.

Resolution:

Correct the code; then recompile.

Example:

In the following example, the SYNC O1 statement correctly uses a reference type; however, the SYNC I1 statement incorrectly references a value type.

       class-id a.
       method-id main static.
           declare o1 as object = "Hello"
           declare i1 as binary-long = 3
           sync o1         *> ok, o1 is a reference type
               continue
           end-sync
           sync i1         *> error, i1 is binary-long, which is a value type
               continue
           end-sync
       end method.
       end class.