Default iteration variables (and similar) should be `undef` outside loops in strict mode
altrisi opened this issue ยท 1 comments
Currently those are initialized to Value.ZERO
(0) even outside of any loops. Suggestion to make access to them the same as access to undefined variables instead in strict mode. And possibly make them to be the standard null
value that is now used for undefined variables in regular mode.
fabric-carpet/src/main/java/carpet/script/Context.java
Lines 75 to 81 in fca98c7
CarpetContext
also initializes another 3 variables similarly.
These are actually completely unusable because of #1567.