dart-atom / dart

A Dart plugin for Atom.
http://dart-atom.github.io/dart/
BSD 3-Clause "New" or "Revised" License
154 stars 44 forks source link

Switch with enum code warnings not consistent with dartpad #1067

Closed mehmetf closed 7 years ago

mehmetf commented 8 years ago

The following code produces no warnings on dartpad:

enum TestEnum {
  VAL1,
  VAL2
}

int f(TestEnum val) {
  switch (val) {
    case TestEnum.VAL1:
      return 0;
    case TestEnum.VAL2:
      return 1;
  }
}

but with Atom:

image

Perhaps dartpad does not show "info" level warnings by default but I wanted to highlight this discrepancy.

eseidelGoogle commented 7 years ago

FYI @devoncarew this was a request from Flutter's customer:leafy at our meeting just now.

devoncarew commented 7 years ago

closing this item - re-filed against the sdk repo.