Skip to content

Make record canonical constructors that can be compact compact#111

Merged
LexManos merged 3 commits intoMinecraftForge:masterfrom
coehlrich:master
Feb 28, 2022
Merged

Make record canonical constructors that can be compact compact#111
LexManos merged 3 commits intoMinecraftForge:masterfrom
coehlrich:master

Conversation

@coehlrich
Copy link
Copy Markdown
Contributor

@coehlrich coehlrich commented Feb 28, 2022

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

variable can be moved back to where it was and compact constructor's
can't use the throws clause anyway
@coehlrich
Copy link
Copy Markdown
Contributor Author

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

@LexManos LexManos merged commit 4fe9bdf into MinecraftForge:master Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record Canonical Constructor's not cleaned/written correctly.

2 participants