[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Assigning to a constant variable with function definition syntax doesn't error
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 17 Jun 2021 10:35:09 -0300
> Hi, I've discovered that the function definition syntax (function
> name(args) body end) doesn't check if the variable assigned to is
> 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?
This is a bug. Thanks for the report.