summaryrefslogtreecommitdiff
path: root/test/pending/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/pos')
-rw-r--r--test/pending/pos/t5503.flags1
-rw-r--r--test/pending/pos/t5503.scala18
-rw-r--r--test/pending/pos/t5521.scala3
-rw-r--r--test/pending/pos/t5534.scala11
-rw-r--r--test/pending/pos/t5585.scala18
-rw-r--r--test/pending/pos/t5654.scala4
6 files changed, 55 insertions, 0 deletions
diff --git a/test/pending/pos/t5503.flags b/test/pending/pos/t5503.flags
new file mode 100644
index 0000000000..e8fb65d50c
--- /dev/null
+++ b/test/pending/pos/t5503.flags
@@ -0,0 +1 @@
+-Xfatal-warnings \ No newline at end of file
diff --git a/test/pending/pos/t5503.scala b/test/pending/pos/t5503.scala
new file mode 100644
index 0000000000..8a1925df1f
--- /dev/null
+++ b/test/pending/pos/t5503.scala
@@ -0,0 +1,18 @@
+trait A {
+ type Type
+ type MethodType <: Type
+
+ val MethodType: MethodTypeExtractor = null
+
+ abstract class MethodTypeExtractor {
+ def unapply(tpe: MethodType): Option[(Any, Any)]
+ }
+}
+
+object Test {
+ val a: A = null
+
+ def foo(tpe: a.Type) = tpe match {
+ case a.MethodType(_, _) =>
+ }
+} \ No newline at end of file
diff --git a/test/pending/pos/t5521.scala b/test/pending/pos/t5521.scala
new file mode 100644
index 0000000000..dc025d0945
--- /dev/null
+++ b/test/pending/pos/t5521.scala
@@ -0,0 +1,3 @@
+class Foo { type Bar }
+
+class Quux(val foo: Foo)(val bar: foo.Bar) \ No newline at end of file
diff --git a/test/pending/pos/t5534.scala b/test/pending/pos/t5534.scala
new file mode 100644
index 0000000000..834c4fd68d
--- /dev/null
+++ b/test/pending/pos/t5534.scala
@@ -0,0 +1,11 @@
+object Phrase extends Enumeration {
+ type Phrase = Value
+ val PHRASE1 = Value("My phrase 1")
+ val PHRASE2 = Value("My phrase 2")
+}
+
+class Entity(text:String)
+
+object Test {
+ val myMapWithPhrases = Phrase.values.map(p => (p -> new Entity(p.toString))).toMap
+} \ No newline at end of file
diff --git a/test/pending/pos/t5585.scala b/test/pending/pos/t5585.scala
new file mode 100644
index 0000000000..5d3eb86111
--- /dev/null
+++ b/test/pending/pos/t5585.scala
@@ -0,0 +1,18 @@
+class Result[+A]
+
+case class Success[A](x: A) extends Result[A]
+
+class Apply[A]
+
+object Apply {
+ def apply[A](f: Int => Result[A]): Apply[A] = new Apply[A]
+}
+
+object TestUnit {
+ def goo : Apply[Option[Int]] = Apply { i =>
+ val p = i match {
+ case 1 => Success(Some(1))
+ case _ => Success(None)
+ }
+ }
+} \ No newline at end of file
diff --git a/test/pending/pos/t5654.scala b/test/pending/pos/t5654.scala
new file mode 100644
index 0000000000..eb711a5f37
--- /dev/null
+++ b/test/pending/pos/t5654.scala
@@ -0,0 +1,4 @@
+case class Bomb(a: Array[_])
+case class Bomb2(a: Array[T] forSome { type T })
+class Okay1(a: Array[_])
+case class Okay2(s: Seq[_]) \ No newline at end of file