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

VDMJ function variable scoping error #13

Closed
joey-coleman opened this issue Nov 22, 2013 · 9 comments
Closed

VDMJ function variable scoping error #13

joey-coleman opened this issue Nov 22, 2013 · 9 comments
Assignees
Milestone

Comments

@joey-coleman
Copy link
Member

The following bug was originally reported on Sourceforge by nick_battle, 2009-09-28 11:11:17:

There is a bug regarding access to named function variables when the environment
also contains a function definition of the same name. Calls involving the variable
will actually be bound to the definition, even though the variable is in scope.

For example:

f(a:int) r:int == a + 1;
g(f:int->int) r:int == f(123);  -- This will call the f above, not the f arg.

You get a warning because the function parameter is not used:

Warning 5000: Definition 'f' not used in 'A' ... at line ...

A workaround is to rename the parameter.

@joey-coleman
Copy link
Member Author

Comment by nick_battle, 2013-05-31 21:02:36.866000:

Still present in 2.0.0b2

@joey-coleman
Copy link
Member Author

Comment by nick_battle, 2013-05-31 21:04:19.772000:

  • Release: --> v2.0.0beta2

@joey-coleman
Copy link
Member Author

Comment by nick_battle, 2013-05-31 21:04:20.065000:

Still present in 2.0.0b2

@joey-coleman
Copy link
Member Author

Comment by nick_battle, 2013-08-09 07:32:17.141000:

  • Release: v2.0.0beta2 --> v2.0.0beta4

@joey-coleman
Copy link
Member Author

Comment by nick_battle, 2013-08-27 15:48:32.137000:

  • Release: v2.0.0beta4 --> v2.0.0beta5

@joey-coleman
Copy link
Member Author

Comment by nick_battle, 2013-09-02 11:06:47.744000:

  • Release: v2.0.0beta5 --> v2.0.0beta6

@joey-coleman
Copy link
Member Author

Comment by nick_battle, 2013-10-16 07:05:44.225000:

  • Release: v2.0.0beta6 --> v2.0.0

@joey-coleman
Copy link
Member Author

Comment by nick_battle, 2013-10-16 07:05:44.602000:

Still in 2.0

@ghost ghost assigned nickbattle Nov 25, 2013
@nickbattle
Copy link
Contributor

This seems to have been fixed at some point, probably along with another fix without realising it. The example given works correctly. Closing.

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

2 participants