Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static classes extending non-static ones removes parameters #407

Open
Gaming32 opened this issue Jul 3, 2024 · 0 comments
Open

Static classes extending non-static ones removes parameters #407

Gaming32 opened this issue Jul 3, 2024 · 0 comments
Labels
bug Something isn't working Priority: Medium Medium priority Subsystem: Statement Structure Anything concerning how statements are structured in a method

Comments

@Gaming32
Copy link

Gaming32 commented Jul 3, 2024

Vineflower version

1.10.1

Describe the bug

Non-static classes can extend non-static inner classes. The syntax to pass the outer class instance is outerClassInstance.super(). Javac inserts a null check around outerClassInstance.

Additional information

VF currently decompiles this:

instance.super(param);

as this:

Objects.requireNonNull(instance);
super(param);

Original and decompiled source, along with class files

@Gaming32 Gaming32 added the bug Something isn't working label Jul 3, 2024
@jaskarth jaskarth added Subsystem: Statement Structure Anything concerning how statements are structured in a method Priority: Medium Medium priority labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: Medium Medium priority Subsystem: Statement Structure Anything concerning how statements are structured in a method
Projects
None yet
Development

No branches or pull requests

2 participants