Skip to content

Commit e51b884

Browse files
committed
The big pending/pos test triage
1 parent 581fee0 commit e51b884

File tree

196 files changed

+57
-670
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+57
-670
lines changed

tests/pending/pos/IterableSelfRec.scala renamed to tests/invalid/pos/IterableSelfRec.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// This does not currently work because it mixes higher-kinded types and raw type constructors.
12
package dotty.collection
23
package immutable
34

File renamed without changes.

tests/pending/pos/dotless-targs.scala renamed to tests/invalid/pos/dotless-targs.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Type arguments on infix operators are not supported by the syntax
12
class A {
23
def fn1 = List apply 1
34
def fn2 = List apply[Int] 2
File renamed without changes.
File renamed without changes.

tests/pending/pos/specializes-sym-crash.scala renamed to tests/invalid/pos/specializes-sym-crash.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// This relies on the naming of the transformed classes which will have to change in the new stdlib.
12
import scala.collection._
23

34
trait Foo[+A,
@@ -6,12 +7,12 @@ trait Foo[+A,
67
extends Seq[A] with SeqLike[A, This] with IterableView[A, Coll] with IterableViewLike[A, Coll, This] {
78
self =>
89

9-
trait Transformed[+B] extends SeqView[B, Coll] with super.Transformed[B] {
10+
trait TransformedFoo[+B] extends SeqView[B, Coll] with super.Transformed[B] {
1011
def length: Int
1112
def apply(idx: Int): B
1213
override def toString = viewToString
1314
}
14-
trait Reversed extends Transformed[A] {
15+
trait Reversed extends TransformedFoo[A] {
1516
override def iterator: Iterator[A] = createReversedIterator
1617
def length: Int = self.length
1718
def apply(idx: Int): A = self.apply(length - 1 - idx)
File renamed without changes.

tests/pending/pos/t3577.scala renamed to tests/invalid/pos/t3577.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ case class C2(checks: Check[_]*);
55
object C {
66
def m(x : C2): Any = (null: Any) match {
77
case C2(_, rest : _*) => {
8+
// Invalid: Vararg pattern cannot be split between normal and :_* patterns.
9+
// This split also does not work for vararg arguments, so there's no
10+
// good argument it should work for patterns
811
rest.map(_.value)
912
}
1013
}

tests/invalid/pos/t3856.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
case class C[T](x: T)
2+
3+
case class CS(xs: C[_]*)
4+
5+
// t3856
6+
object Test {
7+
val x = CS(C(5), C("abc")) match { case CS(C(5), xs : _*) => xs }
8+
// Invalid: Vararg pattern cannot be split between normal and :_* patterns.
9+
// This split also does not work for vararg arguments, so there's no
10+
// good argument it should work for patterns
11+
println(x)
12+
13+
def foo(xs: Int*) = ()
14+
val xs = List(1, 2, 3)
15+
foo(1, xs:_*)
16+
}

tests/pending/pos/t4202.scala renamed to tests/invalid/pos/t4202.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Invalid because syntax has changed;
2+
// template statements cannot be lambdas.
13
object t4202_1 {
24
() => {
35
trait T {

tests/pending/pos/t4237.scala renamed to tests/invalid/pos/t4237.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Invalid because structural types are not supported.
12
class A {
23
(new { def field = 0; def field_=(i: Int) = () }).field = 5 // compiles as expected
34
(new { def field(implicit i: Int) = 0; def field_=(i: Int) = () }).field = 5 // compiles even with implicit params on getter

tests/pending/pos/t4363.scala renamed to tests/invalid/pos/t4363.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Invalid because lambdas can no longer be tenmplate statements.
12
object Test {
23
trait Suite { def bar() = () }
34

tests/pending/pos/t4365/a_1.scala renamed to tests/invalid/pos/t4365/a_1.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Invalid because it relies on internal traits of views that will change their names.
12
import scala.collection._
23

34
trait SeqViewLike[+A,
File renamed without changes.

tests/pending/pos/t4553.scala renamed to tests/invalid/pos/t4553.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Invalid because hk type parameters may not appear in lower bounds
12
trait VectorLike[+T, +V[A] <: Vector[A]] {
23
def +[S, VResult[S] >: V[S]](v: VResult[S]): Unit
34
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/pending/pos/t8023.scala renamed to tests/invalid/pos/t8023.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Invalid because nested hk type parameters are no longer allowed
12
import language._
23

34

File renamed without changes.

tests/pending/pos/t8224.scala renamed to tests/invalid/pos/t8224.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Invalid because nested hk type parameters are no longer allowed
12
import language.higherKinds
23

34
trait P [N1, +E1[X <: N1]]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/pending/pos/hklub0.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/pending/pos/sammy_poly.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/pending/pos/sealed-final.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/pending/pos/t1843.scala

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/pending/pos/t2613.scala

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/pending/pos/t3252.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/pending/pos/t3856.scala

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/pending/pos/t4176b.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/pending/pos/t4269.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class A {
22
PartialFunction.condOpt(Nil) {
3-
case items@List(_*) if true =>
3+
case items@List(_: _*) if true =>
44
}
55
}

0 commit comments

Comments
 (0)