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

[Lua] do .. while{} is converted to while do #11886

Closed
flashultra opened this issue Dec 16, 2024 · 6 comments
Closed

[Lua] do .. while{} is converted to while do #11886

flashultra opened this issue Dec 16, 2024 · 6 comments

Comments

@flashultra
Copy link
Contributor

Not sure is this is a major problem, but when we initialize a variable in the first step and check it in while() at the end , the reordering ( passing null first before assigning ) can lead to a null error.
If this is expected behavior, please close the ticket.
Example

var num:BigInt_;
do {
	num = random(this.bitLength());
} while (BigIntArithmetic.compare(num, BigInt.ZERO) == 0);

BigIntArithmetic.compare will give error as num is null (for Lua)

@Simn
Copy link
Member

Simn commented Dec 16, 2024

I think #11807 fixed this, but please verify!

@flashultra
Copy link
Contributor Author

I couldn't run Haxe Lua on my local PC ( windows) , but on Github CI Lua failed ( https://github.com/HaxeFoundation/haxe/actions/runs/12349062541/job/34459213928#step:11:22058 ) . I'm not sure is this fix applied on Github actions CI or not.

@tobil4sk
Copy link
Member

tobil4sk commented Dec 16, 2024

It won't have applied the change unless you've merged development since the other PR was merged

@tobil4sk
Copy link
Member

I couldn't run Haxe Lua on my local PC ( windows)

Out of curiosity, what issues did you run into when trying to run it?

@flashultra
Copy link
Contributor Author

It was a nightmare with dependencies; trying different versions of Lua (5.1 to 5.3); unable to install packages -
( lrexlib-pcre2 )

About the current issue - it works with #11807

@tobil4sk
Copy link
Member

Yeah it's a bit of a pain installing all the native dependencies on windows, hopefully they shouldn't be required to run a small program with a do while loop. In case they are for whatever reason, it should be possible to disable them with the -D lua-vanilla flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants