Skip to content

Improve error message when attempting to use class modifiers on enum declarations #51935

@jakemac53

Description

@jakemac53

If you attempt to use a class modifier on an enum today, the error is not super clear about the actual problem:

image

It would be nice if we could recognize what the user was trying to do (not declare a variable, but use a class modifier on an enum), and produce a nicer message, similar to what you see for an abstract mixin declaration:

image

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.legacy-area-front-endLegacy: Use area-dart-model instead.type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions