Problem with calling super in overridden default method#4776
Open
stephan-herrmann wants to merge 1 commit intoeclipse-jdt:masterfrom
Open
Problem with calling super in overridden default method#4776stephan-herrmann wants to merge 1 commit intoeclipse-jdt:masterfrom
stephan-herrmann wants to merge 1 commit intoeclipse-jdt:masterfrom
Conversation
Contributor
Author
|
@srikanth-sankaran this change occurs in direct neighborhood of your 039347d. You (2014): if (!original.isAbstract()) {
- if (original2.isAbstract())
+ if (original2.isAbstract() || original2.isDefaultMethod()) I (2026): - if (!original.isAbstract()) {
+ if (!original.isAbstract() && !original.isDefaultMethod()) {
if (original2.isAbstract() || original2.isDefaultMethod()) It actually makes your change more symmetric, in that we treat default methods like abstract methods. Do you see any problem with that? Unfortunately, the sorting from #4727 needs a different strategy, here we need to prioritize implemented methods (i.e., default methods are like concrete). If you agree, then we could actually fix #1600 with no known (!) regression - in a minimal way, i.e. I still believe that |
This was referenced Jan 22, 2026
Improve the fix from eclipse-jdt#4727: - treat default methods like abstract (1 location) - treat default methods like concrete (1 location) Fixes eclipse-jdt#1600
ab93ac1 to
6bbae97
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve the fix from #4727:
Fixes #1600