Hi,
Ivko Stanilov yazmış:
I've often made this mistake in my programs when copying/pasting table
elements, or just by oversight:
local table = { key = "value1", ..., key = "value2" }
Shouldn't the compiler be able to detect this case and report a syntax
error? I know that you could possibly have expressions with side
effects in the place of "value1", but nevertheless I can't envision
a scenario in which having the same constants keys in the same table
constructor is intentional. This is a 100% error in the code and I
think it should be reported as such.
Regards,
Ivko
If you think it like following it makes sense, IMHO:
local table = {}
table.key = "value1"
...
...
table.key = "value2"
--
Regards,
Hakki Dogusan