[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Assigning to a constant variable with function definition syntax doesn't error
- From: Halalaluyafail3 <luigighiron@...>
- Date: Wed, 16 Jun 2021 16:09:21 -0400
Hi, I've discovered that the function definition syntax (function
name(args) body end) doesn't check if the variable assigned to is
constant.
Example:
local x<const>
function x(...)return print(...)end
x"???" --> ???
I feel like this should generate an error, but maybe there is a reason
for this being allowed?