Warning: Use Return to leave a method or procedure; Quit is for loops and Try blocks
Under {"allowQuitForReturn":false}, a Quit that leaves the method or procedure, with no
loop or Try block around it to leave instead. There it does what Return does, and IRIS runs
either; write Return, keeping Quit for loops and Try blocks.
IRIS compiles the example. Checked with the style {"allowQuitForReturn":false}.
Class Demo.QuitExits
{
ClassMethod CountTo(limit As %Integer) As %Integer
{
Set count = 0
For {
Set count = count + 1
If count >= limit Quit
}
Quit count //! S4151
}
}