summaryrefslogtreecommitdiff
path: root/tests/examplefiles/99_bottles_of_beer.chpl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examplefiles/99_bottles_of_beer.chpl')
-rw-r--r--tests/examplefiles/99_bottles_of_beer.chpl27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/examplefiles/99_bottles_of_beer.chpl b/tests/examplefiles/99_bottles_of_beer.chpl
index cdc1e650..ff50b294 100644
--- a/tests/examplefiles/99_bottles_of_beer.chpl
+++ b/tests/examplefiles/99_bottles_of_beer.chpl
@@ -177,3 +177,30 @@ private module M3 {
private var x: int;
}
+prototype module X {
+
+ proc f() throws {
+ throw new Error();
+ }
+
+ proc g() {
+ try {
+ f();
+ try! f();
+ } catch e {
+ writeln("Caught ", e);
+ }
+ }
+
+ proc int.add() { }
+
+ g();
+
+ override proc test() throws {
+ var a = new borrowed IntPair();
+ var b = new owned IntPair();
+ var c = new shared IntPair();
+ throw new unmanaged Error();
+ }
+}
+