//var %a 0 | :sup | inc %a | if (%a == 2) return | noop | :sup | goto sup
does not report an error but it should
alias sup {
var %a 0
:sup
inc %a
if (%a == 2) return
noop
:sup
goto sup
}
This reports * /goto: duplicate 'sup' found (line 2, script.mrc) correctly
This issue gets weirder when it comes to :error goto label.
When you recover from an error with :error + /reseterror, if you get another error in the same routine, it won't jump again to :error.
I was writing a code and I needed to recover from two errors consecutively, (the error are controlled, on purpose), and without thinking twice after seeing it wasn't jumping a second time, I decided to add another :error + reseterror combo, and it worked.
That code is for a bug report I wanted to post, so I wanted to make the code prettier by making it multiline, imagine my surprise when mIRC reported an error about duplicate :error label.
I must say this is probably uncharted territory, I'm not sure which behavior was intended, it's possible that mIRC does not jump again to a single :error label to prevent infinite loop with error happening inbetween, but I believe we should be able to recover from as many errors we want.
If the concern is infinite looping, perhaps /reseterror could get a switch, indicating that a new error should jump to :error again?