-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestdart-model-analyzer-specIssues with the analyzer's implementation of the language specIssues with the analyzer's implementation of the language specdevexp-warningIssues with the analyzer's Warning codesIssues with the analyzer's Warning codeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.
Description
Analyzer reports an error if an extension type declares an external variable
extension type ET1(int id) {
external int m; // COMPILE_TIME_ERROR.EXTENSION_TYPE_DECLARES_INSTANCE_FIELD. Extension types can't declare instance fields.
}According to the spec external instance variables are allowed
A compile-time error occurs if the extension type declaration declares any instance variables, unless they are external.
An external instance variable is just a convenient notation for an external getter and (if not final) an external setter. They are allowed.
Tested on the edge (Aug 24, 2023) SDK on Linux x64
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestdart-model-analyzer-specIssues with the analyzer's implementation of the language specIssues with the analyzer's implementation of the language specdevexp-warningIssues with the analyzer's Warning codesIssues with the analyzer's Warning codeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.