[BLUEJ-1306] Overridden methods with more specific return shown twice in code completion
In Java, it's possible to have a child method with a more specific return type than the original method. For example Parent can have a method "Parent getCopy()" which is overridden in Child as "Child getCopy()". In our code completion, if you then have an object of type Child, the getCopy() method appears twice, once with the Parent return type and once with the Child return type, because we are not recognising that the child method overrides the parent of the same name.
One slightly hacky fix for this would be to deduplicate the signatures minus return, preferring the version from higher in the hierarchy. But ideally we'd recognise the type relations.
Issue metadata
- Issue type: Bug
- Priority: Medium