diff options
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/pos/t2610.scala | 17 | ||||
-rw-r--r-- | test/pending/pos/t2619.scala | 80 | ||||
-rw-r--r-- | test/pending/pos/t2625.scala | 9 | ||||
-rw-r--r-- | test/pending/pos/t2635.scala | 16 | ||||
-rw-r--r-- | test/pending/pos/t2636.scala | 7 | ||||
-rw-r--r-- | test/pending/pos/t2641.scala | 16 |
6 files changed, 145 insertions, 0 deletions
diff --git a/test/pending/pos/t2610.scala b/test/pending/pos/t2610.scala new file mode 100644 index 0000000000..8dd4cde66e --- /dev/null +++ b/test/pending/pos/t2610.scala @@ -0,0 +1,17 @@ +package mada; package defects; package tests + +package object bbb { + def bar = () + aaa.foo // value foo is not a member of package mada.defects.tests.aaa +} + +package object aaa { + def foo = () +} + +/* compiles successfully if placed here.. +package object bbb { + def bar = () + aaa.foo // value foo is not a member of package mada.defects.tests.aaa +} +*/
\ No newline at end of file diff --git a/test/pending/pos/t2619.scala b/test/pending/pos/t2619.scala new file mode 100644 index 0000000000..565bc9572b --- /dev/null +++ b/test/pending/pos/t2619.scala @@ -0,0 +1,80 @@ +abstract class F { + final def apply(x: Int): AnyRef = null +} +abstract class AbstractModule { + def as: List[AnyRef] + def ms: List[AbstractModule] + def fs: List[F] = Nil + def rs(x: Int): List[AnyRef] = fs.map(_(x)) +} +abstract class ModuleType1 extends AbstractModule {} +abstract class ModuleType2 extends AbstractModule {} + +object ModuleAE extends ModuleType1 { + def as = Nil + def ms = Nil +} +object ModuleAF extends ModuleType2 { + def as = Nil + def ms = List(ModuleAE) +} +object ModuleAG extends ModuleType1 { + def as = List("") + def ms = Nil +} +object ModuleAI extends ModuleType1 { + def as = Nil + def ms = List(ModuleAE) +} +object ModuleAK extends ModuleType2 { + def as = Nil + def ms = List(ModuleAF) +} +object ModuleAL extends ModuleType1 { + def as = Nil + def ms = List( + ModuleAG, + ModuleAI + ) +} +object ModuleAM extends ModuleType1 { + def as = Nil + def ms = List( + ModuleAL, + ModuleAE + ) ::: List(ModuleAK) +} +object ModuleBE extends ModuleType1 { + def as = Nil + def ms = Nil +} +object ModuleBF extends ModuleType2 { + def as = Nil + def ms = List(ModuleBE) +} +object ModuleBG extends ModuleType1 { + def as = List("") + def ms = Nil +} +object ModuleBI extends ModuleType1 { + def as = Nil + def ms = List(ModuleBE) +} +object ModuleBK extends ModuleType2 { + def as = Nil + def ms = List(ModuleBF) +} +object ModuleBL extends ModuleType1 { + def as = Nil + def ms = List( + ModuleBG, + ModuleBI + ) +} +object ModuleBM extends ModuleType1 { + def as = Nil + def ms = List( + ModuleBL, + ModuleBE + ) ::: List(ModuleBK) +}
\ No newline at end of file diff --git a/test/pending/pos/t2625.scala b/test/pending/pos/t2625.scala new file mode 100644 index 0000000000..94240cb6c6 --- /dev/null +++ b/test/pending/pos/t2625.scala @@ -0,0 +1,9 @@ +package t + +object T { + case class A(x: Int)(x: Int) + + def A(x: Boolean): Int = 34 + + A(23) +}
\ No newline at end of file diff --git a/test/pending/pos/t2635.scala b/test/pending/pos/t2635.scala new file mode 100644 index 0000000000..378631b23d --- /dev/null +++ b/test/pending/pos/t2635.scala @@ -0,0 +1,16 @@ +abstract class Base + +object Test +{ + def run(c: Class[_ <: Base]): Unit = { + } + + def main(args: Array[String]): Unit = + { + val sc: Option[Class[_ <: Base]] = Some(classOf[Base]) + sc match { + case Some((c: Class[_ <: Base])) => run(c) + case None => + } + } +}
\ No newline at end of file diff --git a/test/pending/pos/t2636.scala b/test/pending/pos/t2636.scala new file mode 100644 index 0000000000..4e6ffb4930 --- /dev/null +++ b/test/pending/pos/t2636.scala @@ -0,0 +1,7 @@ +object o { + val props = new scala.collection.mutable.ListBuffer[(String,String)] + lazy val property = new { + def update(propName: String, p: String) = props += ((propName, p)) + } + def crash = property("a") = "b" +}
\ No newline at end of file diff --git a/test/pending/pos/t2641.scala b/test/pending/pos/t2641.scala new file mode 100644 index 0000000000..fec825c4f9 --- /dev/null +++ b/test/pending/pos/t2641.scala @@ -0,0 +1,16 @@ +import scala.collection._ +import scala.collection.generic._ + +abstract class ManagedSeqStrict[+A] + extends Traversable[A] + with GenericTraversableTemplate[A, ManagedSeqStrict] + +trait ManagedSeq[+A, +Coll] + extends ManagedSeqStrict[A] + with TraversableView[A, ManagedSeqStrict[A]] + with TraversableViewLike[A, ManagedSeqStrict[A], ManagedSeq[A/*ERROR: too few type args*/]] +{ self => + trait Transformed[+B] extends ManagedSeq[B, Coll] with super.Transformed[B] + + trait Sliced extends Transformed[A] with super.Sliced +}
\ No newline at end of file |