Retrieved true containing type of method calls in hover info (handled inheritance case)

This commit is contained in:
bigguy345 committed 2026-01-01 01:01:47 +02:00
1 parent 7b77c1935f
commit 275a5f10c9
1 file changed
+7
@@ -621,6 +621,13 @@ public class TokenHoverInfo {
TypeInfo containingType = null;
if (callInfo != null) {
containingType = callInfo.getReceiverType();
//Checks true containing type from resolved method (handles inheritance cases)
if (callInfo.getResolvedMethod() != null) {
TypeInfo trueContainingType = callInfo.getResolvedMethod().getContainingType();
if (trueContainingType != null)
containingType = trueContainingType;
}
}
if (containingType == null && methodInfo != null) {
containingType = methodInfo.getContainingType();