Skip to content
New issue

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

ERROR TS2454: Variable 'zj' is used before being assigned. #7

Closed
djspys1 opened this issue Apr 19, 2024 · 1 comment
Closed

ERROR TS2454: Variable 'zj' is used before being assigned. #7

djspys1 opened this issue Apr 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@djspys1
Copy link

djspys1 commented Apr 19, 2024

got an error when run build:

pengding@Pengs-MacBook-Pro Client2-main % npm run build

> [email protected] build
> npm run asc && webpack --mode=production --node-env=production


> [email protected] asc
> asc --target release --optimizeLevel 3 --converge

ERROR TS2454: Variable 'zj' is used before being assigned.
     :
 268 │ for (zvec = getBits(gMinlen); zvec > unchecked(gLimit[zn]); zvec = (zvec << 1) | zj) {
     │                                                                                  ~~
     └─ in assembly/bz2.ts(268,90)

ERROR TS2454: Variable 'zj' is used before being assigned.
     :
 299 │ for (zvec = getBits(gMinlen); zvec > unchecked(gLimit[zn]); zvec = (zvec << 1) | zj) {
     │                                                                                  ~~
     └─ in assembly/bz2.ts(299,102)

ERROR TS2454: Variable 'zj' is used before being assigned.
     :
 396 │ for (zvec = getBits(gMinlen); zvec > unchecked(gLimit[zn]); zvec = (zvec << 1) | zj) {
     │                                                                                  ~~
     └─ in assembly/bz2.ts(396,98)

FAILURE 3 compile error(s)

node version:
v16.14.2

@ultraviolet-jordan
Copy link
Collaborator

@djspys1 Yeah I opened an issue to AssemblyScript about this: AssemblyScript/assemblyscript#2838
They claimed to have fixed it which is the problem lol, I reopened here: AssemblyScript/assemblyscript#2840

The package.json is downloading the latest minor build which is breaking it.

So...
I think I will just fix the code so that the error goes away and we can continue to use the latest AssemblyScript version. Will make this change today and let you know.

@ultraviolet-jordan ultraviolet-jordan self-assigned this Apr 19, 2024
@ultraviolet-jordan ultraviolet-jordan added the bug Something isn't working label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants