diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-16 11:32:03 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-16 11:32:03 +0100 |
commit | f3d428e6957501578c9516de2d179adf713ca95f (patch) | |
tree | 2807ac65c3ecf3c22e39df810e12f7ce0d691465 /tests | |
parent | 4079d6d5048dbebf5aaac06be42e9b9484b3934f (diff) | |
download | dotty-f3d428e6957501578c9516de2d179adf713ca95f.tar.gz dotty-f3d428e6957501578c9516de2d179adf713ca95f.tar.bz2 dotty-f3d428e6957501578c9516de2d179adf713ca95f.zip |
Fix to desugaring refinement types.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/typers.scala | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/pos/typers.scala b/tests/pos/typers.scala index 3fcd1ff29..51692e026 100644 --- a/tests/pos/typers.scala +++ b/tests/pos/typers.scala @@ -1,5 +1,5 @@ object typers { - + class List[+T] { def :: (x: T) = new :: (x, this) @@ -17,5 +17,36 @@ object typers { case x :: xs1 => 1 + len(xs1) case Nil => 0 } + + object returns { + + def foo(x: Int): Int = { + return 3 + } + } + + object tries { + + val x = try { + "abc" + } catch { + case ex: java.io.IOException => + 123 + } finally { + println("done") + } + + val y = try 2 catch Predef.identity + + val z = try 3 finally "abc" + + } + + class C { + + } + class Refinements { + val y: C { type T; val key: T; def process(x: T): Int } + } }
\ No newline at end of file |