[Bug]: VariableAccessFilter
does not find all accesses of a generic variable
#5391
Labels
VariableAccessFilter
does not find all accesses of a generic variable
#5391
Describe the bug
The
VariableAccessFilter
should match all accesses to a variable:(from the docs)
This is not the case for the below code. The implementation looks like this:
In the below code,
this.variableReference
is a reference toT field
andctVariableAccess
would be a reference toString field
. That is why even though they access the same field, they do not match.A potential fix for this would be to check if they are refering to the same field:
Source code you are trying to analyze/transform
Source code for your Spoon processing
Actual output
Expected output
No response
Spoon Version
10.4.0
JVM Version
openjdk version "17.0.1" 2021-10-19 OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12) OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode, sharing)
What operating system are you using?
Windows 10
The text was updated successfully, but these errors were encountered: