You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][javasrc2cpg]TypeInferencePass fails to match method calls when argument types are subclasses of declared parameter types #5679
The TypeInferencePass fails to match method calls when the argument types are subclasses of the declared parameter types. The type matching logic in doArgumentTypesMatch() only performs exact type matching and does not consider inheritance hierarchies.
Root Cause: Java's Liskov Substitution Principle allows subclass instances to be passed where parent class instances are expected. The current implementation violates this by requiring exact type matches.
changed the title [-][Bug]TypeInferencePass fails to match method calls when argument types are subclasses of declared parameter types[/-][+][Bug][javasrc2cpg]TypeInferencePass fails to match method calls when argument types are subclasses of declared parameter types[/+]on Oct 15, 2025
I tried to modify the doArgumentTypesMatch() and add some type matching logic like "|| is subtype of" then recompile javasrc2cpg. but i wanna them give a solution too
Activity
[-][Bug]TypeInferencePass fails to match method calls when argument types are subclasses of declared parameter types[/-][+][Bug][javasrc2cpg]TypeInferencePass fails to match method calls when argument types are subclasses of declared parameter types[/+]warama17 commentedon Oct 17, 2025
Hello!
I encountered the same issue.
I tried using the fetch-dependencies option when creating the CPG, but the result was the same.
I would like to know how to resolve this, too.
jjzdxmd commentedon Oct 20, 2025
I tried to modify the doArgumentTypesMatch() and add some type matching logic like "|| is subtype of" then recompile javasrc2cpg. but i wanna them give a solution too