Skip to content

Commit a9a67d5

Browse files
committed
Move warn tests to warn
1 parent dd9808a commit a9a67d5

File tree

127 files changed

+255
-386
lines changed

Some content is hidden

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

127 files changed

+255
-386
lines changed

tests/neg-deep-subtype/i3324.scala

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

tests/neg/i10994.scala

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

tests/neg/i11963a.scala

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

tests/neg/i11963b.scala

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

tests/neg/i11963c.scala

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

tests/neg/i14705.scala

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

tests/neg/i2673.scala

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

tests/neg/i2673b.scala

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

tests/neg/i2673c.scala

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

tests/neg/i4936b.scala

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

tests/neg/i6190b.scala

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

tests/neg/i9266.scala

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

tests/neg/i9751.scala

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

tests/neg/manifest-summoning-b.scala

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

tests/neg/old-syntax.scala

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

tests/neg/ovlazy.scala

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

tests/neg/14034b.scala renamed to tests/warn/14034b.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings -deprecation
1+
//> using options -deprecation
22

33
@deprecated trait Exp
44
@deprecated val exp = 1
@@ -12,5 +12,4 @@ type Bar = Option[exp.type] // warn
1212
type Baz = Exp | Int // warn
1313
type Quux = [X] =>> X match
1414
case Exp => Int // warn
15-
type Quuz[A <: Exp] = Int // warn
16-
// nopos-error: No warnings can be incurred under -Werror.
15+
type Quuz[A <: Exp] = Int // warn
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings
1+
22

33
class Test {
44
def remove[S](a: S | Int, f: Int => S):S = a match {
@@ -9,5 +9,3 @@ class Test {
99
val t: Int | String = 5
1010
val t1 = remove[String](t, _.toString)
1111
}
12-
13-
// nopos-error: No warnings can be incurred under -Werror.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings
1+
22

33
class C[T] {
44
val x: Any = ???
@@ -8,5 +8,4 @@ class C[T] {
88
case x: List[String] => // warn: unchecked
99
case x: T => // warn: unchecked
1010
}
11-
}
12-
// nopos-error: No warnings can be incurred under -Werror.
11+
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings
1+
22

33
trait C[T]
44
class D[T]
@@ -8,5 +8,4 @@ class Test {
88
case _: D[T] => // warn
99
case _: C[Int] => // warn
1010
}
11-
}
12-
// nopos-error: No warnings can be incurred under -Werror.
11+
}

tests/neg-deep-subtype/3324g.scala renamed to tests/warn/3324g.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings
1+
22

33
class Test {
44
trait A[+T]
@@ -18,5 +18,4 @@ class Test {
1818
}
1919

2020
quux(new C[Int])
21-
}
22-
// nopos-error: No warnings can be incurred under -Werror.
21+
}

tests/neg/IsInstanceOfClassTag2.scala renamed to tests/warn/IsInstanceOfClassTag2.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings
1+
22

33
import scala.reflect.TypeTest
44

@@ -23,4 +23,3 @@ object IsInstanceOfClassTag {
2323
}
2424
}
2525

26-
// nopos-error: No warnings can be incurred under -Werror.

tests/neg-deep-subtype/JavaSeqLiteral.scala renamed to tests/warn/JavaSeqLiteral.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings
1+
22

33
object Test1 {
44
trait Tree[-T]
@@ -29,5 +29,3 @@ object Test2 {
2929

3030
foo1(new DummyTree)
3131
}
32-
33-
// nopos-error: No warnings can be incurred under -Werror.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings -feature
1+
//> using options -feature
22

33
object A {
44
@deprecated("use bar instead of this one", "0.2.3")
@@ -8,5 +8,4 @@ object A {
88
object B {
99
A.foo
1010
}
11-
// nopos-warn there was 1 deprecation warning; re-run with -deprecation for details
12-
// nopos-error: No warnings can be incurred under -Werror.
11+
// nopos-warn there was 1 deprecation warning; re-run with -deprecation for details

tests/neg-deep-subtype/conditionalWarnings.scala renamed to tests/warn/conditionalWarnings.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -deprecation -Xfatal-warnings
1+
//> using options -deprecation
22

33
object Test {
44
@deprecated def foo = ???
@@ -12,5 +12,4 @@ object Test {
1212
// The program compiles with final line
1313
// there was 1 feature warning; re-run with -feature for details
1414
// nopos-warn
15-
}
16-
// nopos-error: No warnings can be incurred under -Werror.
15+
}

tests/neg/convertible.scala renamed to tests/warn/convertible.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings -feature
1+
//> using options -feature
22

33
import language.experimental.into
44

@@ -27,5 +27,4 @@ object Test:
2727

2828
def h(x: into Text) =
2929
val y = h1(x)
30-
y("abc") // warn, inference through type variable does not propagate
31-
// nopos-error: No warnings can be incurred under -Werror.
30+
y("abc") // warn, inference through type variable does not propagate

tests/neg/deprecated-override.scala renamed to tests/warn/deprecated-override.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -source future -deprecation -Xfatal-warnings
1+
//> using options -source future -deprecation
22

33
trait A:
44
def f: Int
@@ -12,5 +12,4 @@ class C extends B:
1212
trait D extends A:
1313
override def f = 3
1414

15-
object E extends B, D // warn
16-
// nopos-error: No warnings can be incurred under -Werror.
15+
object E extends B, D // warn

tests/neg/feature-shadowing.scala renamed to tests/warn/feature-shadowing.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings -feature
1+
//> using options -feature
22

33
import language.implicitConversions
44
given Conversion[Int, String] = _.toString
@@ -13,4 +13,3 @@ object a:
1313
object c:
1414
import language.implicitConversions
1515
val s: String = 3 // OK again
16-
// nopos-error: No warnings can be incurred under -Werror.

tests/neg/gadt-contradictory-pattern.scala renamed to tests/warn/gadt-contradictory-pattern.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings -Wimplausible-patterns
1+
//> using options -Wimplausible-patterns
22
object Test {
33
sealed abstract class Foo[T]
44
case object Bar1 extends Foo[Int]
@@ -11,5 +11,4 @@ object Test {
1111
case (Bar3, _) => ()
1212
}
1313

14-
}
15-
// nopos-error: No warnings can be incurred under -Werror.
14+
}

tests/neg-deep-subtype/gadt.scala renamed to tests/warn/gadt.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings
1+
22

33
class Test {
44
trait A[+T]
@@ -13,5 +13,3 @@ class Test {
1313

1414
quux(new B[D])
1515
}
16-
17-
// nopos-error: No warnings can be incurred under -Werror.

tests/neg-deep-subtype/html.scala renamed to tests/warn/html.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings
1+
22

33
object HTML:
44
type AttrArg = AppliedAttr | Seq[AppliedAttr]
@@ -18,5 +18,3 @@ object HTML:
1818
}
1919
sb
2020
}
21-
22-
// nopos-error: No warnings can be incurred under -Werror.

tests/neg/i10247.scala renamed to tests/warn/i10247.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings -deprecation
1+
//> using options -deprecation
22

33
def usered = Color.Red // warn: value Red is deprecated
44

@@ -25,5 +25,4 @@ enum Color {
2525

2626
object Color {
2727
def useFoo2 = DeprecatedContainer.foo // warn // check that only enum cases are avoided
28-
}
29-
// nopos-error: No warnings can be incurred under -Werror.
28+
}

tests/neg/i10930.scala renamed to tests/warn/i10930.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using options -Xfatal-warnings
1+
22

33
import language.future
44
@main def Test =
@@ -12,5 +12,4 @@ import language.future
1212
case x: String => x.charAt(0) // warn
1313
case x: Array[t] => leafElem(x(1)) // warn
1414
case x: Iterable[t] => leafElem(x.head) // warn
15-
case x: AnyVal => x // warn
16-
// nopos-error: No warnings can be incurred under -Werror.
15+
case x: AnyVal => x // warn

tests/warn/i10994.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
def foo = true match
4+
case (b: Boolean): Boolean => () // warn
5+

0 commit comments

Comments
 (0)