-
Notifications
You must be signed in to change notification settings - Fork 0
Support for function invocations as If conditions #28
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
Conversation
# Conflicts: # latte/src/test/java/AppTest.java
|
@CatarinaGamboa a verificação do return type da função adequa-se, ou não vale a pena tendo em conta que já é checked pelo compiler? |
| visitCtFieldRead((CtFieldRead<?>)condition); | ||
| } else if (condition instanceof CtInvocation) { | ||
| CtInvocation<?> invocation = (CtInvocation<?>) condition; | ||
| if (!invocation.getType().getQualifiedName().equals("boolean")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to check this as the Java compiler already performs this check
| } | ||
|
|
||
| public void test(@Free Object v1, boolean c1){ | ||
| if (boolRead(c1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now add more tests with methods that use the Objects with permissions like @Unique, and see if their changes are added to the context after the call.
Não é preciso fazermos porque estamos a trabalhar sobre o compilador de Java e por isso já sabemos que os tipos básicos fazem type check. |
Description
Added support for function invocations in If conditions
Example
if (function(x)){ _logic_ }Related Issue
Closes #22
Type of change
How Has This Been Tested?
Added tests that verify the correct functionality