Skip to content

Commit 2c9e845

Browse files
committed
Add test that exercises a cycle reference when playing with SeqType
1 parent f50c1f7 commit 2c9e845

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

tests/pos/seqtype-cycle/Test1.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Test {
2+
def bar = Array(1) // call to Array(_: Repeated)
3+
}

tests/pos/seqtype-cycle/Test2.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package object scala {
2+
// needed for some reasons
3+
type Throwable = java.lang.Throwable
4+
type IndexOutOfBoundsException = java.lang.IndexOutOfBoundsException
5+
6+
type Seq[+A] = scala.collection.Seq[A]
7+
val Seq = scala.collection.Seq
8+
}

tests/pos/seqtype-cycle/Test3.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package scala
2+
3+
class specialized(types: Int*) extends scala.annotation.StaticAnnotation
4+
5+
package collection {
6+
class Foo[@specialized(1, 2) A]
7+
8+
trait Seq[A] extends Foo[A]
9+
object Seq extends SeqFactory[Seq]
10+
11+
trait SeqFactory[CC[X] <: Seq[X]]
12+
}

0 commit comments

Comments
 (0)