summaryrefslogtreecommitdiff
path: root/test/files/run/caseclasses.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/caseclasses.scala')
-rw-r--r--test/files/run/caseclasses.scala31
1 files changed, 16 insertions, 15 deletions
diff --git a/test/files/run/caseclasses.scala b/test/files/run/caseclasses.scala
index 147b1cdd4e..809bfb3511 100644
--- a/test/files/run/caseclasses.scala
+++ b/test/files/run/caseclasses.scala
@@ -3,26 +3,27 @@ case class Foo(x: int)(y: int);
case class Bar;
object Test extends Application {
+ import compat.Platform.IndexOutOfBoundsException
+
def fn[a,b](x: a => b) = x;
val f = fn(Foo(1))
(f(2): AnyRef) match {
- case Foo(1) => System.out.println("OK")
- case Bar() => System.out.println("NO")
+ case Foo(1) => Console.println("OK")
+ case Bar() => Console.println("NO")
}
- try {
- Bar() caseElement 2
- throw new NullPointerException("duh")
- } catch {
- case x:IndexOutOfBoundsException =>
- }
+ try {
+ Bar() caseElement 2
+ throw new NullPointerException("duh")
+ } catch {
+ case x:IndexOutOfBoundsException =>
+ }
- try {
- f(2) caseElement 2
- throw new NullPointerException("duh")
- } catch {
- case x:IndexOutOfBoundsException =>
- }
+ try {
+ f(2) caseElement 2
+ throw new NullPointerException("duh")
+ } catch {
+ case x:IndexOutOfBoundsException =>
+ }
}
-