question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Super calls not resolved

See original GitHub issue

Example:

public class A {
    public int getInt() {
        return 42;
    }
}

public class B extends A {
    @Override
    public int getInt() {
        return super.getInt() + 2;
    }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Masrepuscommented, May 15, 2020

Ah I just double checked, the method itself is correctly resolved as A.getInt. So the problem is on our side as it seems

0reactions
oxistocommented, May 15, 2020

I was looking at https://github.com/javaparser/javaparser/commit/5d63f63846f6049603771d4ff1928ba9fa0e98ab which sounded like in general super calls are resolved but not for specific cases

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is super.super.method(); not allowed in Java?
Wanting to call super.super.toString() contradicts your own decision when you choose to extend a class thus accepting all (not some of) its features....
Read more >
keyword to force calling the super on any method #21388
The problem is that, unlike a constructor, there is no way to force a method overriding another one to call the parent "super"...
Read more >
IntelliJ IDEA cannot resolve calls to super() if constructor is not ...
Hello guys, I am having trouble with 'moving' (CTRL + B or CTRL + left click) to super constructor inside IntelliJ IDEA. It...
Read more >
The `super` keyword doesn't work as it should? - ESDiscuss.org
A super query must not depend on this (only), it must statically resolve the object on which the called method is defined. In...
Read more >
Super Keyword in Java - GeeksforGeeks
One more important thing is that 'super' can call both parametric as well as non-parametric constructors depending upon the situation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found