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 use handling by TC for ==> and <==> #792

Closed
PaulKlint opened this issue Mar 24, 2015 · 2 comments
Closed

Incorrect use handling by TC for ==> and <==> #792

PaulKlint opened this issue Mar 24, 2015 · 2 comments

Comments

@PaulKlint
Copy link
Member

After type checking this program:

value main(list[value] args) {
    xyz = false;
    c = true ==> xyz;
    return true;
}

the use of the variable xyz does not occur in the configuration returned by the type checker.

Replacing ==> by <==> has the same effect, however using == works fine.

@mahills
Copy link
Member

mahills commented Mar 24, 2015

If I run this using the checker I see the following:

rascal>c.uses;
rel[int,loc]: {<63,|project://StandardLibrary/src/lang/rascal/types/ToTest.rsc|(101,3,<5,17>,<5,20>)>}

rascal>c.store[63];
AbstractValue: variable(
  RSimpleName("xyz")[
    @at=|project://StandardLibrary/src/lang/rascal/types/ToTest.rsc|(71,3,<4,4>,<4,7>)
  ],
  bool(),
  true,
  60,
  |project://StandardLibrary/src/lang/rascal/types/ToTest.rsc|(71,3,<4,4>,<4,7>))

This seems like what one would expect. Are you not seeing it in the configuration at all? I haven't changed anything related to this.

@PaulKlint
Copy link
Member Author

Thanks for the double check. You are right: I get a NoSuchKey(69) error in the compiler and misread the 69 for a 63. Sorry for the confusion, I keep digging ...

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

No branches or pull requests

2 participants