Files
sdk/tests/compiler/dart2js/impact/data/fallthrough.dart
T
Johnni Winther 3fc7925894 Add impact_test
Change-Id: Ic607d69375d1ad41f6aac349822e47c7dbf77b5a
Reviewed-on: https://dart-review.googlesource.com/54906
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 13:53:56 +00:00

39 lines
783 B
Dart

// Copyright (c) 2018, 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.
/*element: main:
static=[testSwitchWithFallthrough(1)],
type=[inst:JSNull]
*/
main() {
testSwitchWithFallthrough(null);
}
/*element: testSwitchWithFallthrough:
static=[
FallThroughError._create(2),
throwExpression,
wrapException],
type=[inst:JSDouble,
inst:JSInt,
inst:JSNumber,
inst:JSPositiveInt,
inst:JSString,
inst:JSUInt31,
inst:JSUInt32]
*/
testSwitchWithFallthrough(o) {
switch (o) {
case 0:
// ignore: CASE_BLOCK_NOT_TERMINATED
case 1:
o = 2;
case 2:
o = 3;
return;
case 3:
default:
}
}