-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work oncustomer-flutterlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Milestone
Description
See #27141 for details.
The analyzer should accept an assert "expression" (like an assert statement without a trailing ;) as an element in initializer lists.
To enable: add the flag enableAssertInitializer in the language section of the .analysis_options file. Here is an example:
analyzer:
language:
enableAssertInitializer: true
As an initial implementation, the analyzer can skip analyzing the assertion completely.
It would be great if it could also evaluate any assert in a const context (in an initializer of a const constructor which is used to create a compile-time constant value). This would enable earlier errors for the team that is experimenting with the feature.
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work oncustomer-flutterlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug