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

Incorrect module scope for min/max function variables #722

Closed
nickbattle opened this issue May 18, 2020 · 1 comment
Closed

Incorrect module scope for min/max function variables #722

nickbattle opened this issue May 18, 2020 · 1 comment
Labels
bug Incorrect behaviour of the tool language Issues in parser, TC, interpreter, POG or CG Mergable A fix is available on a branch to merge for release
Milestone

Comments

@nickbattle
Copy link
Contributor

This is an internal problem that only affects the code generation of specifications which use type definitions that have ord clauses. The implicit min_T and max_T functions that are created use parameters called x and y to compare. The names of these variables do not have the correct module set during type checking, which causes problems during the code generation phase.

The solution is to set the module for these variables to be the same as that of the type definition.

@nickbattle nickbattle added bug Incorrect behaviour of the tool language Issues in parser, TC, interpreter, POG or CG labels May 18, 2020
@nickbattle nickbattle added the Mergable A fix is available on a branch to merge for release label May 18, 2020
@nickbattle
Copy link
Contributor Author

Fix now available in ncb/development.

@idhugoid idhugoid added this to the v3.0.0 milestone Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behaviour of the tool language Issues in parser, TC, interpreter, POG or CG Mergable A fix is available on a branch to merge for release
Projects
None yet
Development

No branches or pull requests

2 participants