blob: 0f5d2af76a3319ce6f16c8cc9e9c3388bd7f9ec8 [file] [log] [blame]
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// test w/ `pub run test -N no_default_cases`
// Enum-like
class EL {
final int i;
const EL._(this.i);
static const e = EL._(1);
static const f = EL._(2);
static const g = EL._(3);
}
void el(EL e) {
switch(e) {
case EL.e :
print('e');
break;
default : // LINT
print('default');
}
}
enum E {
e, f, g,
}
void e(E e) {
switch(e) {
case E.e :
print('e');
break;
default : // LINT
print('default');
}
}
void i(int i) {
switch(i) {
case 1 :
print('1');
break;
default : // OK
print('default');
}
}