-
-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
a filter_global_assignment rule would serve useful in the case that rename_variables changes variable names to already existing global names. I have currently had an issue with the rename_variables rule overriding local variable names to existing global names and causing errors within my script.
It would also be a fair option to ditch this entirely for an extra parameter to also rename globals.
Examples
--unmodified
a = 0;
local b = 1;
print(a);
-- outputs: 0
-- expected output: 0--rename_variables transform
a = 0;
local a = 1;
print(a);
-- outputs: 1
-- expected output: 0--filter_global_assignment > rename_variables transform
getfenv().a = 0;
local a = 1;
print(getfenv().a);
-- outputs: 0
-- expected output: 0Jack5079, UsernameWhere, maumaumaumaumaumau, tactical-manx75 and 294914959
Metadata
Metadata
Assignees
Labels
No labels