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

Fix checking whether an inner class is static or not when finding generics from parameters #120

Closed coehlrich closed 1 year ago

coehlrich commented 1 year ago

When it tries to find generics from parameters if the class being referenced is an inner class it would check the StructClass which only contains the access flags from the inner class which doesn't include whether the inner class is static or not so it would always skip the first parameter. This replaces it with a check on the access flags using ClassNode which takes the access flags from the inner class entry which do contain whether the inner class is static or not.

22w45a diff: https://gist.github.com/coehlrich/1aca58aecd998880b4908c10ba1e5b8a