-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failureslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
The analyzer raises the warning missing_enum_constant_in_switch
for the code below, saying Missing case clause for 'data'
and similarly for moreData
. Of course, they shouldn't have case clauses.
enum E {
a, b;
static final data = "I'm not a real enum member";
static const moreData = 'Neither am I';
String get name {
switch(this) {
case a:
return 'AAAA';
case b:
return 'BBBB';
}
}
}
(Dart SDK version: 2.17.1 (stable))
srawlins, fzyzcjy, mono0926, renggli, albertms10 and 2 more
Metadata
Metadata
Assignees
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failureslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)