diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-01-15 16:48:56 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-01-16 10:35:09 -0800 |
commit | 77dffe4aa79b414ab3f3a0a24c34140f1bbd6024 (patch) | |
tree | 9f737ea5aff9db636e5c01b3792c675463957b43 /test/files/pos | |
parent | ef332d2a265ab86a6ec415be61b7896a83068bca (diff) | |
parent | 6f3ea77870ab5e17805ef0fc338c251e87870b8c (diff) | |
download | scala-77dffe4aa79b414ab3f3a0a24c34140f1bbd6024.tar.gz scala-77dffe4aa79b414ab3f3a0a24c34140f1bbd6024.tar.bz2 scala-77dffe4aa79b414ab3f3a0a24c34140f1bbd6024.zip |
Merge branch '2.10.x'
Conflicts:
src/compiler/scala/tools/nsc/doc/Settings.scala
src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala
src/compiler/scala/tools/nsc/matching/Patterns.scala
src/compiler/scala/tools/nsc/transform/UnCurry.scala
src/compiler/scala/tools/nsc/typechecker/Infer.scala
src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/internal/settings/MutableSettings.scala
src/reflect/scala/reflect/runtime/Settings.scala
src/swing/scala/swing/SwingActor.scala
src/swing/scala/swing/SwingWorker.scala
test/files/run/t6955.scala
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/package-case.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t2130-1.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t2130-2.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t3999b.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t4052.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t6479.scala | 56 | ||||
-rw-r--r-- | test/files/pos/t6925.scala | 9 | ||||
-rw-r--r-- | test/files/pos/t6925b.scala | 18 |
8 files changed, 88 insertions, 0 deletions
diff --git a/test/files/pos/package-case.flags b/test/files/pos/package-case.flags new file mode 100644 index 0000000000..2f174c4732 --- /dev/null +++ b/test/files/pos/package-case.flags @@ -0,0 +1 @@ +-Ycompanions-in-pkg-objs diff --git a/test/files/pos/t2130-1.flags b/test/files/pos/t2130-1.flags new file mode 100644 index 0000000000..2f174c4732 --- /dev/null +++ b/test/files/pos/t2130-1.flags @@ -0,0 +1 @@ +-Ycompanions-in-pkg-objs diff --git a/test/files/pos/t2130-2.flags b/test/files/pos/t2130-2.flags new file mode 100644 index 0000000000..2f174c4732 --- /dev/null +++ b/test/files/pos/t2130-2.flags @@ -0,0 +1 @@ +-Ycompanions-in-pkg-objs diff --git a/test/files/pos/t3999b.flags b/test/files/pos/t3999b.flags new file mode 100644 index 0000000000..2f174c4732 --- /dev/null +++ b/test/files/pos/t3999b.flags @@ -0,0 +1 @@ +-Ycompanions-in-pkg-objs diff --git a/test/files/pos/t4052.flags b/test/files/pos/t4052.flags new file mode 100644 index 0000000000..2f174c4732 --- /dev/null +++ b/test/files/pos/t4052.flags @@ -0,0 +1 @@ +-Ycompanions-in-pkg-objs diff --git a/test/files/pos/t6479.scala b/test/files/pos/t6479.scala new file mode 100644 index 0000000000..c463bc5ab0 --- /dev/null +++ b/test/files/pos/t6479.scala @@ -0,0 +1,56 @@ +object TailrecAfterTryCatch { + + @annotation.tailrec + final def good1() { + 1 match { + case 2 => { + try { + // return + } catch { + case e: ClassNotFoundException => + } + good1() + } + } + } + + @annotation.tailrec + final def good2() { + //1 match { + // case 2 => { + try { + return + } catch { + case e: ClassNotFoundException => + } + good2() + // } + //} + } + + @annotation.tailrec + final def good3() { + val 1 = 2 + try { + return + } catch { + case e: ClassNotFoundException => + } + good3() + } + + @annotation.tailrec + final def bad() { + 1 match { + case 2 => { + try { + return + } catch { + case e: ClassNotFoundException => + } + bad() + } + } + } + +}
\ No newline at end of file diff --git a/test/files/pos/t6925.scala b/test/files/pos/t6925.scala new file mode 100644 index 0000000000..862a6e9d0e --- /dev/null +++ b/test/files/pos/t6925.scala @@ -0,0 +1,9 @@ +class Test { + def f[T](xs: Set[T]) /* no expected type to trigger inference */ = + xs collect { case x => x } + + def g[T](xs: Set[T]): Set[T] = f[T](xs) // check that f's inferred type is Set[T] + + // check that this type checks: + List(1).flatMap(n => Set(1).collect { case w => w }) +}
\ No newline at end of file diff --git a/test/files/pos/t6925b.scala b/test/files/pos/t6925b.scala new file mode 100644 index 0000000000..ca25146dfc --- /dev/null +++ b/test/files/pos/t6925b.scala @@ -0,0 +1,18 @@ +// code *generated* by test/scaladoc/run/SI-5933.scala +// duplicated here because it's related to SI-6925 + +import language.higherKinds + +abstract class Base[M[_, _]] { + def foo[A, B]: M[(A, B), Any] +} + +class Derived extends Base[PartialFunction] { + def foo[AA, BB] /*: PartialFunction[(A, B) => Any]*/ = { case (a, b) => (a: AA, b: BB) } +} + +object Test { + lazy val lx = { println("hello"); 3 } + def test1(x: Int = lx) = ??? + def test2(x: Int = lx match { case 0 => 1; case 3 => 4 }) = ??? +}
\ No newline at end of file |