-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-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
Description
The following construct should be avoided:
class Thing {
double x;
double y;
double z;
Thing(this.x, this.y, this.z);
Thing.empty() {}
}
Issues are:
- x, y, and z could become null if Thing is constructed via
empty().
The VM has a hard time optimizing fields that could be double or null. dart2js has a hard time optimizing field access that could be null.
Of course, I could set x,y,z to final. Or, I could eliminate empty() constructor.
Metadata
Metadata
Assignees
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-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