spoon icon indicating copy to clipboard operation
spoon copied to clipboard

Inspect if all instances of `CtTypeReferences` in a model built from source have a set source position

Open algomaster99 opened this issue 3 years ago • 0 comments

https://github.com/INRIA/spoon/pull/4296 added a patch that sets source position for a very specific case. However, I think there are still many cases left. One of them has been described here.

We need to come up with test cases that use instances or child instances of CtTypeReference in different ways, for example, type of parameters in a function declaration, array type references, etc. This will help us find out where the bug and fixing it will produce a more generic patch.

One more subtask of this issue is to understand why is there such a specific if condition in ReferenceBuilder. https://github.com/INRIA/spoon/blob/363a2eb9f95731a57060466c5e43726ec347d7a6/src/main/java/spoon/support/compiler/jdt/ReferenceBuilder.java#L269 Upon reading, it seems like the code prevents building qualified type references for instances with public and private modifiers.

algomaster99 avatar Nov 19 '21 09:11 algomaster99