Error: Method ‘{name}’ overrides {cls}’s but {difference}
The method overrides one a superclass declares, but a formal argument or the return type has
another class. IRIS accepts the declared class or a subclass of it, and refuses any other
class or a dropped return type (ERROR #5478). An object class’s subclass is reported too:
a caller that knows only the superclass may pass the declared class, and the override then
fails when it runs. Use the classes the superclass declares.
IRIS rejects the example.
Class Demo.OverrideRefused Extends %Persistent
{
Method %OnBeforeSave(insert As %Boolean) As %String //! A3604
{
Return insert
}
}