ee32255b21
Fixes http://dartbug.com/51169 Fixes http://dartbug.com/51176 Change-Id: Iaa38585ce311319f2f4c106fc979c99d931eaa15 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280106 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Paul Berry <paulberry@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
18 lines
328 B
Dart
18 lines
328 B
Dart
class Class {
|
|
dynamic field;
|
|
Class(this.field);
|
|
}
|
|
|
|
test(a) {
|
|
switch (a) {
|
|
case (foo: int b) when b != 2:
|
|
print(b);
|
|
case (foo: (int, int) b) when b != (2, 3):
|
|
print(b);
|
|
case Class(field: int b) when b != 2:
|
|
print(b);
|
|
case Class(field: (int, int) b) when b != (2, 3):
|
|
print(b);
|
|
}
|
|
}
|