Previous Topic Next topic Print topic


COBCH1609 Property accessor visibility must be stricter than property visibility

The visibility of a GETTER or SETTER phrase is not as strict as the visibility of its containing property.

The visibility of a GETTER or SETTER phrase must be stricter than the visibility of its containing property:

class-id myClass1.
property-id myProp1 string private.
    setter protected.  *> this is incorrect
    set property-value to "1234"
    getter.		
end property.
end class.

class-id myClass2.
property-id myProp2 string public.
    setter protected.			*> this is correct
    set property-value to "5678"
    getter.
    declare myString as string.
    set myString to property-value
end property.
end class.
Previous Topic Next topic Print topic