egallesio / STklos

STklos Scheme
http://stklos.net
GNU General Public License v2.0
69 stars 17 forks source link

Redefining a symbol should clear its immutbale bit #549

Closed jpellegrini closed 1 year ago

jpellegrini commented 1 year ago

set! is not allowed on a mutable binding; but a 'define' would actually redefine the binding, so we should clear the immutability bit. In order to forbid defines, one should make the module immutable (not the symbol) -- which is already possible using module-immutable!. Right?

egallesio commented 1 year ago

You are right! Thanks for the fixed. Merged