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

MInt syntax with no uses of Int2MInt crashes #798

Open
Baltoli opened this issue Jul 11, 2023 · 2 comments
Open

MInt syntax with no uses of Int2MInt crashes #798

Baltoli opened this issue Jul 11, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Baltoli
Copy link
Contributor

Baltoli commented Jul 11, 2023

Compiling this code crashes the code generator; if the commented line is un-commented then it will compile and run correctly.

module TEST
  imports INT
  imports MINT

  syntax MInt{1}

  // rule _:Int => Int2MInt(0)::MInt{1}
endmodule

If the code is ill-formed for some reason when the rule is not present, we should emit a friendlier error message either in the frontend or in the backend.

@Baltoli Baltoli added the bug Something isn't working label Jul 11, 2023
@Baltoli
Copy link
Contributor Author

Baltoli commented Jul 17, 2023

This is a known bug; there's no reason it shouldn't work but is very low priority because there's no good reason to declare and not use one of these sorts.

@Baltoli
Copy link
Contributor Author

Baltoli commented Jul 17, 2023

Though @dwightguth comments that it's a confusing error for new users trying to experiment with MInt{...}; we should try and fix this.

@Baltoli Baltoli self-assigned this Jul 17, 2023
@Baltoli Baltoli removed their assignment Aug 5, 2023
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

1 participant