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

Vineflower drops generics that are needed later down a method chain #397

Open
MattiDragon opened this issue May 18, 2024 · 1 comment
Open
Labels
bug Something isn't working Priority: Medium Medium priority Subsystem: Generics Anything concerning how generics are decompiled

Comments

@MattiDragon
Copy link

Vineflower version

1.10.1

Describe the bug

Vineflower sometimes deletes generics that make a call chain legal. Example:
The following (compiled with Temurin-21.0.3+9):

Optional.<Object>of("test").orElse(4).toString()

decompiles to:

Optional.of("test").orElse(4).toString()

which is not legal as orElse doesn't allow changing the type.

Additional information

A similar case happens in minecraft in net.minecraft.commands.arguments.item.ItemInput.getItemName (mojmap).

@MattiDragon MattiDragon added the bug Something isn't working label May 18, 2024
@0x3C50

This comment was marked as off-topic.

@jaskarth jaskarth added Subsystem: Generics Anything concerning how generics are decompiled Priority: Medium Medium priority labels May 20, 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: Generics Anything concerning how generics are decompiled
Projects
None yet
Development

No branches or pull requests

3 participants