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

strange issue with switch @jump called inside a macro called from a case in another switch @jump #1896

Closed
Book-reader opened this issue Jan 27, 2025 · 6 comments
Assignees
Labels
Fixed Needs Verification Fixed, but needs verification that it works

Comments

@Book-reader
Copy link
Contributor

Book-reader commented Jan 27, 2025

fn void main()
{
  switch (0) @jump
  {
    case 0:
      foo();
  }

}


macro foo()
{
  io::printn("Inside Foo");
  switch (1) @jump
  {
    case 2:
      io::printfn("This should never happen");
  }

}

This should never happen is printed. If either of the @jumps are removed then Inside Foo is printed instead

@Book-reader Book-reader changed the title code generation issue with switch @jump called inside a macro called from a case in another switch @jump strange issue with switch @jump called inside a macro called from a case in another switch @jump Jan 27, 2025
@Book-reader
Copy link
Contributor Author

how.mp4

lerno added a commit that referenced this issue Jan 27, 2025
@lerno
Copy link
Collaborator

lerno commented Jan 27, 2025

This should be fixed now. Sorry about that one.

@lerno lerno self-assigned this Jan 27, 2025
@lerno lerno added the Fixed Needs Verification Fixed, but needs verification that it works label Jan 27, 2025
@Book-reader
Copy link
Contributor Author

it works, but it looks like you left some debug prints in:

Image

@lerno
Copy link
Collaborator

lerno commented Jan 27, 2025

Agh thank you for pointing that out.

@lerno
Copy link
Collaborator

lerno commented Jan 27, 2025

Please check now.

@Book-reader
Copy link
Contributor Author

Thank You!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Needs Verification Fixed, but needs verification that it works
Projects
None yet
Development

No branches or pull requests

2 participants