aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t1168.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/t1168.scala')
-rw-r--r--tests/pos/t1168.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/pos/t1168.scala b/tests/pos/t1168.scala
new file mode 100644
index 000000000..75638e792
--- /dev/null
+++ b/tests/pos/t1168.scala
@@ -0,0 +1,16 @@
+object Test extends App {
+
+ trait SpecialException {}
+
+ try {
+ throw new Exception
+ } catch {
+ case e : SpecialException => {
+ println("matched SpecialException: "+e)
+ assume(e.isInstanceOf[SpecialException])
+ }
+ case e : Exception => {
+ assume(e.isInstanceOf[Exception])
+ }
+ }
+}