Skip to content

Commit 3da5e04

Browse files
committed
Fix tests to survive wellformedness checks
1 parent 9ad85c3 commit 3da5e04

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

test/dotc/tests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class tests extends CompilerTest {
105105
@Test def neg_typedapply() = compileFile(negDir, "typedapply", xerrors = 4)
106106
@Test def neg_typedidents() = compileFile(negDir, "typedIdents", xerrors = 2)
107107
@Test def neg_assignments() = compileFile(negDir, "assignments", xerrors = 3)
108-
@Test def neg_typers() = compileFile(negDir, "typers", xerrors = 13)(allowDoubleBindings)
108+
@Test def neg_typers() = compileFile(negDir, "typers", xerrors = 14)(allowDoubleBindings)
109109
@Test def neg_privates() = compileFile(negDir, "privates", xerrors = 2)
110110
@Test def neg_rootImports = compileFile(negDir, "rootImplicits", xerrors = 2)
111111
@Test def neg_templateParents() = compileFile(negDir, "templateParents", xerrors = 3)
@@ -135,7 +135,7 @@ class tests extends CompilerTest {
135135
@Test def neg_badAuxConstr = compileFile(negDir, "badAuxConstr", xerrors = 2)
136136
@Test def neg_typetest = compileFile(negDir, "typetest", xerrors = 1)
137137
@Test def neg_t1569_failedAvoid = compileFile(negDir, "t1569-failedAvoid", xerrors = 1)
138-
@Test def neg_clashes = compileFile(negDir, "clashes", xerrors = 2)
138+
@Test def neg_clashes = compileFile(negDir, "clashes", xerrors = 3)
139139
@Test def neg_cycles = compileFile(negDir, "cycles", xerrors = 8)
140140
@Test def neg_boundspropagation = compileFile(negDir, "boundspropagation", xerrors = 5)
141141
@Test def neg_refinedSubtyping = compileFile(negDir, "refinedSubtyping", xerrors = 2)
@@ -150,7 +150,7 @@ class tests extends CompilerTest {
150150
@Test def neg_instantiateAbstract = compileFile(negDir, "instantiateAbstract", xerrors = 8)
151151
@Test def neg_selfInheritance = compileFile(negDir, "selfInheritance", xerrors = 6)
152152
@Test def neg_selfreq = compileFile(negDir, "selfreq", xerrors = 4)
153-
@Test def neg_singletons = compileFile(negDir, "singletons", xerrors = 5)
153+
@Test def neg_singletons = compileFile(negDir, "singletons", xerrors = 8)
154154
@Test def neg_shadowedImplicits = compileFile(negDir, "arrayclone-new", xerrors = 2)
155155
@Test def neg_traitParamsTyper = compileFile(negDir, "traitParamsTyper", xerrors = 5)
156156
@Test def neg_traitParamsMixin = compileFile(negDir, "traitParamsMixin", xerrors = 2)

tests/neg/i50-volatile.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
object Test {
1+
class Test {
22
class Base {
33
class Inner
44
}

tests/neg/singletons.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ object Test {
55

66
val n: null = null // error: Null is not a legal singleton type
77

8-
val sym: 'sym = 'sym // error: Symbol is a legal singleton type
8+
val sym: 'sym = 'sym // error: Symbol is not a legal singleton type
99

1010
val foo: s"abc" = "abc" // error: not a legal singleton type
1111
}

tests/neg/typers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ object typers {
3030
}
3131

3232
type L[X] = scala.collection.immutable.List[X]
33-
type M[X, Y] <: scala.collection.immutable.Map[X, Y]
33+
type M[X, Y] <: scala.collection.immutable.Map[X, Y] // error: only classes can have declared but undefined members
3434

3535
object hk {
3636
def f(x: L) // error: missing type parameter

tests/pos/i566.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
object Test {
1+
class Test {
22
type T = String
33
type U
44
reflect.classTag[T]

tests/pos/tycons.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ abstract class Functor[F <: TypeConstructor] {
1616
def map[A, B](f: F { type TypeArg <: A }): F { type TypeArg <: B }
1717
}
1818

19-
implicit object ListFunctor extends Functor[List] {
19+
object ListFunctor extends Functor[List] {
2020
override def map[A, B](f: List { type TypeArg <: A }): List { type TypeArg <: B } = ???
2121
}
2222

tests/run/classTags.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
object Test {
1+
object Test {
22
type T = String
3-
type U
43

54
/* val a /* : Class[T] */ = classOf[T] // [Ljava/lang/String;
65
println(a)
@@ -14,7 +13,7 @@ object Test {
1413
val f /* : ClassTag[Array[T with U]] */ = reflect.classTag[Array[T with U]] // ClassTag(arrayClass(classOf[java.lang.String]))
1514
println(f)
1615
val g /* : Class[Meter] */ = classOf[Meter] // [LMeter;
17-
println(g)
16+
println(g)
1817
val h /* : ClassTag[Meter] */ = reflect.classTag[Meter] // ClassTag(classOf[Meter])
1918
println(h)
2019
*/

0 commit comments

Comments
 (0)