Skip to content

Conversation

@TimothyMakkison
Copy link
Contributor

@TimothyMakkison TimothyMakkison commented Jan 21, 2026

[] will usually default to a List<T> when it is ambiguous, this ensures that an empty array is used when possible.

Before

image

After

image

@thomhurst
Copy link
Owner

This feels like the compiler should have logic to use empty arrays in these scenarios! I was under the impression [] abstracted a lot of the stuff away and would choose the best type for you

@thomhurst thomhurst merged commit 137b683 into thomhurst:main Jan 25, 2026
8 of 10 checks passed
This was referenced Jan 26, 2026
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