A CASE clause of the current DO SELECT-TYPE block refers to a type that is not a sub-type of the head type.

#2191   Compile-time error

A CASE clause of the current DO SELECT-TYPE block refers to a type that is not a sub-type of the head type.

Additional Information

'X' is not a sub-type of 'Y'.

Explanation

All types referenced in case clauses of do select-type must be subtypes of the static type of the expression following do select-type, i.e., the head type.