Warning: Method ‘{name}’ overrides {cls}’s {difference}
A method of the same name as one a superclass declares overrides it and is reached through
the superclass’s signature: a caller holding the superclass passes the formal arguments it
declares. An override that takes another number of them, or takes one in another mode (by
value, ByRef, Output), leaves that caller passing what the override does not take. IRIS
compiles and runs it all the same, dropping an extra argument and leaving a missing one
undefined. %OnNew is exempt: %New alone calls it, with %New’s own arguments, so each
class declares what it is built with. A formal argument or return of another class is
A3604.
IRIS compiles the example.
Class Demo.OverrideSignature Extends %Persistent
{
Method %OnBeforeSave() As %Status //! A1841
{
Return $$$OK
}
}