FabricMC / fabric-loom

Gradle build system plugin used to automate the setup of a minecraft mod development environment.
MIT License
242 stars 212 forks source link

Fix a Specific Case Issue of Generics in Injected Interfaces (when more than one type parameter are provided by the Target Class) #1177

Closed FirstMegaGame4 closed 2 months ago

FirstMegaGame4 commented 2 months ago

I discovered while wanting to use the second type parameter of net.minecraft.state.State<O,S> in a injected interface, that the second check I made in #1050 was not properly working. In fact, only the first type parameter of the target class was properly read, meaning that if an injected interface wanted to use another type parameter than the first one the check would fail.

This was entirely my fault, I wrongly used SignatureVisitor#visitEnd as I thought this one would be called once SignatureReader would finish to read the signature of the target class.

I also added a test case clearly showing that the issue was solved in the pull request.