Index: tests/language/issue21159_test.dart |
diff --git a/tests/language/isssue_21159.dart b/tests/language/issue21159_test.dart |
similarity index 50% |
rename from tests/language/isssue_21159.dart |
rename to tests/language/issue21159_test.dart |
index 2d2b6c858ce7d8ed32049886a6179abe922f82b3..0130b95205d2dd87a9dabd4e9f27675d0cf2ef25 100644 |
--- a/tests/language/isssue_21159.dart |
+++ b/tests/language/issue21159_test.dart |
@@ -2,10 +2,23 @@ |
// 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. |
+import "package:expect/expect.dart"; |
+ |
class C { |
get call => this; |
} |
-main() { |
+// Recurs outside the try-block to avoid disabling inlining. |
+foo() { |
new C()(); |
} |
+ |
+main() { |
+ bool exceptionCaught = false; |
+ try { |
+ foo(); |
+ } on StackOverflowError catch (e) { |
+ exceptionCaught = true; |
+ } |
+ Expect.equals(true, exceptionCaught); |
+} |