A: This statement is correct. go_subl = CAST #(go_super) will not work. This is because go_subl is a data object of type REF TO cl_subl, which is a reference to the subclass cl_subl. go_super is a data object of type REF TO cl_super, which is a reference to the superclass cl_super. The CAST operator is used to perform a downcast or an upcast of a reference variable to another reference variable of a compatible type. A downcast is a conversion from a more general type to a more specific type, while an upcast is a conversion from a more specific type to a more general type. In this case, the CAST operator is trying to perform a downcast from go_super to go_subl, but this is not possible, as go_super is not pointing to an instance of cl_subl, but to an instance of cl_super. Therefore, the CAST operator will raise an exception CX_SY_MOVE_CAST_ERROR at runtime12
B: This statement is incorrect. go_sub2 = CAST #(go_super) will work. go_subl = CAST #(go_super) will not work. This is because go_sub2 is a data object of type REF TO cl_sub2, which is a reference to the subclass cl_sub2. go_super is a data object of type REF TO cl_super, which is a reference to the superclass cl_super. The CAST operator is used to perform a downcast or an upcast of a reference variable to another reference variable of a compatible type. A downcast is a conversion from a more general type to a more specific type, while an upcast is a conversion from a more specific type to a more general type. In this case, the CAST operator is trying to perform a downcast from go_super to go_sub2, and this is possible, as go_super is pointing to an instance of cl_sub2, which is a subclass of cl_super. Therefore, the CAST operator will assign the reference of go_super to go_sub2 without raising an exception. However, the CAST operator will not work for go_subl, as explained in statement A12
C: This statement is incorrect. go_sub2 = CAST #(go_super) will work. go_sub2->sub2_meth1(…) will not work. This is because go_sub2 is a data object of type REF TO cl_sub2, which is a reference to the subclass cl_sub2. go_super is a data object of type REF TO cl_super, which is a reference to the superclass cl_super. The CAST operator is used to perform a downcast or an upcast of a reference variable to another reference variable of a compatible type. A downcast is a conversion from a more general type to a more specific type, while an upcast is a conversion from a more specific type to a more general type. In this case, the CAST operator is trying to perform a downcast from go_super to go_sub2, and this is possible, as go_super is pointing to an instance of cl_sub2, which is a subclass of cl_super. Therefore, the CAST operator will assign the reference of go_super to go_sub2 without raising an exception. However, the method call go_sub2->sub2_meth1(…) will not work, as sub2_meth1 is a subclass-specific method of cl_sub2, which is not inherited by cl_super. Therefore, the method call will raise an exception CX_SY_DYN_CALL_ILLEGAL_METHOD at runtime123
D: This statement is correct. go_subl->subl_meth1(…) will work. This is because go_subl is a data object of type REF TO cl_subl, which is a reference to the subclass cl_subl. subl_meth1 is a subclass-specific method of cl_subl, which is not inherited by cl_super. Therefore, the method call go_subl->subl_meth1(…) will work, as go_subl is pointing to an instance of cl_subl, which has the method subl_meth1123