Warning: Output formal argument ‘{name}’ is never assigned
The method never assigns this Output formal argument. IRIS compiles the method all the
same, and a caller that passes a variable with . to receive a value gets none. The
variable keeps what it held, and if it was undefined before the call, reading it raises
<UNDEFINED>. Assign the formal argument, or remove it from the method.
IRIS compiles the example, and do ##class(Demo.OutputNeverAssigned).Double(5, .result) write result raises <UNDEFINED> when it runs.
Class Demo.OutputNeverAssigned
{
ClassMethod Double(value As %Integer, Output result As %Integer) As %Integer //! A4476
{
Quit value * 2
}
}