Previous Topic Next topic Print topic


COBCH1764 Method <method-name> is more visible than return type <type-name>

The visibility of the specified method is not compatible with the visibility of its declared return type.

If both the method and the return type specify access modifiers, they must match, or at least the return type be more visible than the method. See Access Modifiers for more information.

In the following example, you must change one of the access modifiers to match the other, or remove the modifiers completely (in which case, PUBLIC visibility is assumed).

class-id Animal.
method-id giveVax PUBLIC.
procedure division returning ret as Type vaxType.
...
end method.
class-id vaxType PRIVATE.
...
end class.
end class.
Previous Topic Next topic Print topic