Error message when using inner static with type parameters is misleading #48427
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This code
generates this error:
which is misleading because a local type parameter is being used.
The original message was different.
I have one question: why this is forbidden? There is an issue with some discussion but I do not see why this is not possible.
Using static with type parameters is very useful, for example, defining thread local buffer for store temporary results (like in a sorting algorithm).
The text was updated successfully, but these errors were encountered: