mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:51:18 +00:00
ddf5372de2
R=ahe@google.com Review URL: https://codereview.chromium.org//16802004 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23910 260f80e4-7a28-3924-810f-c04153c831b5
26 lines
585 B
Dart
26 lines
585 B
Dart
// Copyright (c) 2013, 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.
|
|
|
|
// Regression test for dart2js that used to be confused when inlining
|
|
// method that always aborts in a switch case.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
foo() { throw 42; }
|
|
|
|
main() {
|
|
var exception;
|
|
try {
|
|
switch (42) {
|
|
case 42:
|
|
foo();
|
|
foo();
|
|
break;
|
|
}
|
|
} catch (e) {
|
|
exception = e;
|
|
}
|
|
Expect.equals(42, exception);
|
|
}
|