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
Unable to insert constructor return type #144
Comments
It's difficult to understand the exact problem. Can you give example input and output files, and a command line that you think should create the output files from the input files? Thanks! |
Testcase: public class FieldAssignCase2_1 {
FieldAssignCase2_1() {
}
Object foo(){return null;}
} Jailf file:
I run this command to insert annotations from jaif file to source code: ../annotation-tools/annotation-file-utilities/scripts/insert-annotations-to-source default.jaif testinput/inference/limited-inferrable-afu/FieldAssignCase2_1.java -v The console output is:
And the insertion result is: import qual.A;
public class FieldAssignCase2_1 {
FieldAssignCase2_1() {
}
@A
Object foo(){return null;}
} The expected result is: both constructor return and method return have annotation But if I use this syntax in jaif file:
And run the same command: ../annotation-tools/annotation-file-utilities/scripts/insert-annotations-to-source default.jaif testinput/inference/limited-inferrable-afu/FieldAssignCase2_1.java -v I got console output:
and expected insertion result: import qual.A;
public class FieldAssignCase2_1 {
@A
FieldAssignCase2_1() {
}
@A
Object foo(){return null;}
} So the new syntax using |
The existing test for constructor return types works: The difference to your test is that
you should see the expected outcome. If annotation
However, the latter isn't working for me. @topnessman can you verify that changing the annotation to a type use annotation allows you to insert it on the constructor return type? |
Hi @wmdietl ,
Yes, by changing annotation to type use annotation and inserting again, the constructor return type is inserted back correctly. The jaif file is:
And the file is: import qual.A;
public class FieldAssignCase2_1 {
@A
FieldAssignCase2_1() {
}
@A
Object foo(){return null;}
}
I confirmed that inserting declaration annotation to constructor return doesn't work.
Insertion result is the same as the one above. |
Please read the sections below.
The text was updated successfully, but these errors were encountered: