Recaf icon indicating copy to clipboard operation
Recaf copied to clipboard

Inner class constructor selection quirks

Open Col-E opened this issue 5 years ago • 0 comments

Describe the bug

When you decompile an anonymous inner class and try to select the constructor in decompile mode, it will not register it in some cases because JavaParser does not understand there is an implicit instance of the outer class being passed to the constructor. So it effectively tries to look up the constructor definition with a missing first parameter, so the context menu doesn't appear.

If the decompile screws up and emits the synthetic first parameter for the outer class it will work though.

Problem area

JavaParserUtil.checkForDeclaredSelection(SymbolResolver solver, Node node) is the area that likely will need to be updated for this.

Col-E avatar Sep 24 '20 02:09 Col-E