We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have updated my package version from 0.27.23 to 0.27.26.
0.27.23
0.27.26
There is now a compiling issue where: ERROR TS2454: Variable 'zj' is used before being assigned.
ERROR TS2454: Variable 'zj' is used before being assigned.
Here is the code block:
let zn: i32 = gMinlen; let zvec: i32; let zj: u8; for (zvec = getBits(gMinlen, state); zvec > unchecked(gLimit[zn]); zvec = (zvec << 1) | zj) { zn++; zj = getBit(state); }
The fix is simple like:
let zn: i32 = gMinlen; let zvec: i32; let zj: u8 = 0; // <=== FIX for (zvec = getBits(gMinlen, state); zvec > unchecked(gLimit[zn]); zvec = (zvec << 1) | zj) { zn++; zj = getBit(state); }
I do not know if this is intended or not, here is valid Java code for example:
int zn = gMinlen; int zvec; byte zj; for (zvec = getBits(gMinlen, s); zvec > gLimit[zn]; zvec = zvec << 1 | zj) { zn++; zj = getBit(s); }
Just wanted to report just in case. ty
The text was updated successfully, but these errors were encountered:
This looks like a regression from #2826...sorry!
Sorry, something went wrong.
fix: for loop statement incrementor will be processed in correct context
528a480
Fixes: AssemblyScript#2838 incrementor in for loop statement should be processed after executing body.
Successfully merging a pull request may close this issue.
Bug description
I have updated my package version from
0.27.23
to0.27.26
.There is now a compiling issue where:
ERROR TS2454: Variable 'zj' is used before being assigned.
Steps to reproduce
Here is the code block:
The fix is simple like:
I do not know if this is intended or not, here is valid Java code for example:
Just wanted to report just in case. ty
AssemblyScript version
0.27.26
The text was updated successfully, but these errors were encountered: