summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authoramin <nada.amin@epfl.ch>2012-08-21 15:20:40 +0200
committeramin <nada.amin@epfl.ch>2012-08-21 15:20:40 +0200
commit6ea65ac798637950472d6c04b9168053d2af158d (patch)
tree3b87673de0cf9c28df39d6187334f3e5fbedd2ca /test/files/pos
parent2b93ace3518ce48f145d3afb8d4e1abe9fcb26aa (diff)
parent1ab4994990a21c1ea4dadcf15368013d89456ca6 (diff)
downloadscala-6ea65ac798637950472d6c04b9168053d2af158d.tar.gz
scala-6ea65ac798637950472d6c04b9168053d2af158d.tar.bz2
scala-6ea65ac798637950472d6c04b9168053d2af158d.zip
Merge branch '2.10.x'
Review by @paulp or @gkossakowski. Conflicts: src/compiler/scala/tools/nsc/ast/parser/Scanners.scala src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/transform/UnCurry.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/internal/Types.scala
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/SI-5788.scala5
-rw-r--r--test/files/pos/hk-match/a.scala5
-rw-r--r--test/files/pos/hk-match/b.scala1
-rw-r--r--test/files/pos/specializes-sym-crash.scala26
4 files changed, 34 insertions, 3 deletions
diff --git a/test/files/pos/SI-5788.scala b/test/files/pos/SI-5788.scala
index 93b84bde87..f292461804 100644
--- a/test/files/pos/SI-5788.scala
+++ b/test/files/pos/SI-5788.scala
@@ -1,4 +1,3 @@
-trait Test {
- trait B[T]
- private final def grow[T](): B[T] = grow[T]()
+trait Foo[@specialized(Int) A] {
+ final def bar(a:A):A = bar(a)
}
diff --git a/test/files/pos/hk-match/a.scala b/test/files/pos/hk-match/a.scala
new file mode 100644
index 0000000000..7144068f3c
--- /dev/null
+++ b/test/files/pos/hk-match/a.scala
@@ -0,0 +1,5 @@
+trait A {
+ type HKAlias[X] = List[X]
+
+ (null: Any) match { case f: Bippy[HKAlias] => f }
+}
diff --git a/test/files/pos/hk-match/b.scala b/test/files/pos/hk-match/b.scala
new file mode 100644
index 0000000000..f7d21f6383
--- /dev/null
+++ b/test/files/pos/hk-match/b.scala
@@ -0,0 +1 @@
+trait Bippy[E[X]]
diff --git a/test/files/pos/specializes-sym-crash.scala b/test/files/pos/specializes-sym-crash.scala
new file mode 100644
index 0000000000..c46f435ac4
--- /dev/null
+++ b/test/files/pos/specializes-sym-crash.scala
@@ -0,0 +1,26 @@
+import scala.collection._
+
+trait Foo[+A,
+ +Coll,
+ +This <: GenSeqView[A, Coll] with GenSeqViewLike[A, Coll, This]]
+extends GenSeq[A] with GenSeqLike[A, This] with GenIterableView[A, Coll] with GenIterableViewLike[A, Coll, This] {
+self =>
+
+ trait Transformed[+B] extends GenSeqView[B, Coll] with super.Transformed[B] {
+ def length: Int
+ def apply(idx: Int): B
+ override def toString = viewToString
+ }
+ trait Reversed extends Transformed[A] {
+ override def iterator: Iterator[A] = createReversedIterator
+ def length: Int = self.length
+ def apply(idx: Int): A = self.apply(length - 1 - idx)
+ final override protected[this] def viewIdentifier = "R"
+
+ private def createReversedIterator = {
+ var lst = List[A]()
+ for (elem <- self) lst ::= elem
+ lst.iterator
+ }
+ }
+}