duplicate indentifier, but there isn't one!
BlitzMax Forums/BlitzMax Programming/duplicate indentifier, but there isn't one!
| ||
The program gives the error "duplicate identifier"Function test(value:Int = 5) If value = 5 Local mylocal:Int = 12345 Else Local mylocal:Int = 12345 End If End Function Only 1 of the local declarations should ever be executed in 1 call of this function, so is this a bug ? |
| ||
It seems to work fine with a Strict or SuperStrict at the top. I remember reading something way back about Local acting slightly differently in non-Strict mode, but since I always use Strict, I don't recall the details. |
| ||
Locals in Non-Strict functions all have the same scope - the function they're declared in. |
| ||
It would be good if there was some kind of documentation for this |
| ||
Right On the other side, there is no intelligent reason not to use at least strict to identify typing mistakes straight away. (one of the largest annoyances in Blitz3D after all :) ) |
| ||
Indeed, I use superstrict but it just so happened it was in an import which I was still working on and forgot to insert the "superstrict" at the top. |