Skip to content

Fix multi-dimensional arrays in generic signatures - #240

Merged
LlamaLad7 merged 2 commits into
FabricMC:mainfrom
Chocohead:arraySignatures
Nov 1, 2026
Merged

LlamaLad7 merged 2 commits into
FabricMC:mainfrom
Chocohead:arraySignatures

Conversation

@Chocohead

Copy link
Copy Markdown

When a generic parameter is passed as an array, such as...

class Example<T> extends Parent<T[]> implements Interface<T[][]> {
}

Mixin will flatten the parameters down into single dimensional arrays in ClassSignature#toString.

This PR retains array depth during parsing so it can be written back out correctly.

Previously only considered if a type was or wasn't an array
There is a charm to them though
@LlamaLad7
LlamaLad7 merged commit b5acee9 into FabricMC:main Nov 1, 2026
2 checks passed
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.

2 participants