MinecraftForge / ForgeFlower

Forge's modifications to FernFlower. Fixing various bugs/inconsistencies. Main Repo: https://github.com/MinecraftForge/FernFlower
Apache License 2.0
80 stars 44 forks source link

Make record canonical constructors that can be compact compact #111

Closed coehlrich closed 2 years ago

coehlrich commented 2 years ago

1.18.2-rc1 diff

Couldn't move it to where the hide synthetic record methods is called since at that point the constructor parameters have already been written.

Since I had to remove the exprents because of the previous statement that means lexs canonical constructor detection no longer worked so I moved it with the compact canonical constructor detection where it checks if there's any exprents leftover after removing the field assignments

Fixes #108

coehlrich commented 2 years ago

The 2nd commit doesn't change the decompilation output but I did notice I left the decompiled jar in the folders when doing the diff originally so I updated it anyway.

Here's the ForgeFlower patch after unindenting the if (!compact) { block by 1: patch