diff options
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/pos/t7486.scala | 8 | ||||
-rw-r--r-- | test/pending/pos/t7778/Foo_1.java | 6 | ||||
-rw-r--r-- | test/pending/pos/t7778/Test_2.scala | 3 | ||||
-rw-r--r-- | test/pending/pos/treecheckers.flags | 1 | ||||
-rw-r--r-- | test/pending/pos/treecheckers/c1.scala | 12 | ||||
-rw-r--r-- | test/pending/pos/treecheckers/c2.scala | 1 | ||||
-rw-r--r-- | test/pending/pos/treecheckers/c3.scala | 8 | ||||
-rw-r--r-- | test/pending/pos/treecheckers/c4.scala | 9 | ||||
-rw-r--r-- | test/pending/pos/treecheckers/c5.scala | 3 | ||||
-rw-r--r-- | test/pending/pos/treecheckers/c6.scala | 4 | ||||
-rw-r--r-- | test/pending/run/t7733.check | 1 | ||||
-rw-r--r-- | test/pending/run/t7733/Separate_1.scala | 5 | ||||
-rw-r--r-- | test/pending/run/t7733/Test_2.scala | 9 |
13 files changed, 62 insertions, 8 deletions
diff --git a/test/pending/pos/t7486.scala b/test/pending/pos/t7486.scala deleted file mode 100644 index 6dd7f4c4ac..0000000000 --- a/test/pending/pos/t7486.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Test{ - var locker = 0 - // remove implicit, or change to `locker = locker + 1` to make it compile. - implicit val davyJones0 = { - locker += 0 - 0 - } -} diff --git a/test/pending/pos/t7778/Foo_1.java b/test/pending/pos/t7778/Foo_1.java new file mode 100644 index 0000000000..65431ffd46 --- /dev/null +++ b/test/pending/pos/t7778/Foo_1.java @@ -0,0 +1,6 @@ +import java.util.concurrent.Callable; + +public abstract class Foo_1<T> implements Callable<Foo_1<Object>.Inner> { + public abstract class Inner { + } +} diff --git a/test/pending/pos/t7778/Test_2.scala b/test/pending/pos/t7778/Test_2.scala new file mode 100644 index 0000000000..306303a99e --- /dev/null +++ b/test/pending/pos/t7778/Test_2.scala @@ -0,0 +1,3 @@ +class Test { + null: Foo_1[_] +} diff --git a/test/pending/pos/treecheckers.flags b/test/pending/pos/treecheckers.flags new file mode 100644 index 0000000000..5319681590 --- /dev/null +++ b/test/pending/pos/treecheckers.flags @@ -0,0 +1 @@ +-Ycheck:all
\ No newline at end of file diff --git a/test/pending/pos/treecheckers/c1.scala b/test/pending/pos/treecheckers/c1.scala new file mode 100644 index 0000000000..b936839039 --- /dev/null +++ b/test/pending/pos/treecheckers/c1.scala @@ -0,0 +1,12 @@ +object Test1 { + def f[T](xs: Array[T]): Array[T] = xs match { case xs => xs } + // [check: patmat] The symbol, tpe or info of tree `(x) : Array[T]` refers to a out-of-scope symbol, type T. tree.symbol.ownerChain: value x + // [check: patmat] The symbol, tpe or info of tree `(x) : Array[T]` refers to a out-of-scope symbol, type T. tree.symbol.ownerChain: value x + + def g[T](xs: Array[T]): Array[T] = { + val x1: Array[T] = xs + def case4() = matchEnd3(x1) + def matchEnd3(x: Array[T]) = x + case4() + } +} diff --git a/test/pending/pos/treecheckers/c2.scala b/test/pending/pos/treecheckers/c2.scala new file mode 100644 index 0000000000..c893a5c922 --- /dev/null +++ b/test/pending/pos/treecheckers/c2.scala @@ -0,0 +1 @@ +class Test2(val valueVal: Int) extends AnyVal diff --git a/test/pending/pos/treecheckers/c3.scala b/test/pending/pos/treecheckers/c3.scala new file mode 100644 index 0000000000..e480bbfb08 --- /dev/null +++ b/test/pending/pos/treecheckers/c3.scala @@ -0,0 +1,8 @@ +import scala.collection.mutable.ArrayOps + +object Test3 { + implicit def genericArrayOps[T](xs: Array[T]): ArrayOps[T] = (xs match { + case x: Array[AnyRef] => refArrayOps[AnyRef](x) + case x: Array[Boolean] => booleanArrayOps(x) + }).asInstanceOf[ArrayOps[T]] +} diff --git a/test/pending/pos/treecheckers/c4.scala b/test/pending/pos/treecheckers/c4.scala new file mode 100644 index 0000000000..2328131770 --- /dev/null +++ b/test/pending/pos/treecheckers/c4.scala @@ -0,0 +1,9 @@ +sealed trait Message[+A] +class Script[A] extends Message[A] { + def iterator: Iterator[Message[A]] = ??? +} + +trait Test4[A] { + def f(cmd: Message[A]): Iterator[A] = cmd match { case s: Script[t] => s.iterator flatMap f } + def g(cmd: Message[A]) = cmd match { case s: Script[t] => s } +} diff --git a/test/pending/pos/treecheckers/c5.scala b/test/pending/pos/treecheckers/c5.scala new file mode 100644 index 0000000000..43cbb65d74 --- /dev/null +++ b/test/pending/pos/treecheckers/c5.scala @@ -0,0 +1,3 @@ +trait Factory[CC[X] <: Traversable[X]] + +object Test5 extends Factory[Traversable] diff --git a/test/pending/pos/treecheckers/c6.scala b/test/pending/pos/treecheckers/c6.scala new file mode 100644 index 0000000000..8283655f3a --- /dev/null +++ b/test/pending/pos/treecheckers/c6.scala @@ -0,0 +1,4 @@ +object Test6 { + import scala.reflect.ClassTag + def f[T: ClassTag] = implicitly[ClassTag[T]].runtimeClass match { case x => x } +} diff --git a/test/pending/run/t7733.check b/test/pending/run/t7733.check new file mode 100644 index 0000000000..19765bd501 --- /dev/null +++ b/test/pending/run/t7733.check @@ -0,0 +1 @@ +null diff --git a/test/pending/run/t7733/Separate_1.scala b/test/pending/run/t7733/Separate_1.scala new file mode 100644 index 0000000000..a326ecd53e --- /dev/null +++ b/test/pending/run/t7733/Separate_1.scala @@ -0,0 +1,5 @@ +package test + +class Separate { + for (i <- 1 to 10) println(i) +}
\ No newline at end of file diff --git a/test/pending/run/t7733/Test_2.scala b/test/pending/run/t7733/Test_2.scala new file mode 100644 index 0000000000..28358574ec --- /dev/null +++ b/test/pending/run/t7733/Test_2.scala @@ -0,0 +1,9 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +object Test extends App { + val tb = cm.mkToolBox() + val code = tb.parse("{ val x: test.Separate$$anonfun$1 = null; x }") + println(tb.eval(code)) +}
\ No newline at end of file |