Skip to content

Commit 9292a2d

Browse files
committed
Restore forgotten fatal-warnings tests
In daeee35, support for tests in the directory `tests/pos-special/fatal-warnings` was dropped in favor of magic `//>` comments in the regular `tests/pos` directory, but a few tests were forgotten in the original directory and were thus not run. This commit moves them to the appropriate directory with the correct magic comment. [Cherry-picked 0ee804f][modified]
1 parent cf74996 commit 9292a2d

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

compiler/test/dotc/pos-test-pickling.blacklist

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ i13433.scala
2828
i16649-irrefutable.scala
2929
strict-pattern-bindings-3.0-migration.scala
3030
i17255
31+
i17735.scala
3132

3233
# Tree is huge and blows stack for printing Text
3334
i7034.scala

tests/pos-special/fatal-warnings/i17735.scala renamed to tests/pos/i17735.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// scalac: -Wvalue-discard
1+
//> using options -Xfatal-warnings -Wvalue-discard
22

33
import scala.collection.mutable
44
import scala.annotation.nowarn
@@ -21,4 +21,4 @@ object Foo:
2121
// here @nowarn is effective without -Wfatal-warnings (i.e. no warning)
2222
// But with -Wfatal-warnings we get an error
2323
messageBuilder.append("\n").append(s): @nowarn("msg=discarded non-Unit value*")
24-
messageBuilder.result()
24+
messageBuilder.result()

tests/pos-special/fatal-warnings/i17735a.scala renamed to tests/pos/i17735a.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// scalac: -Wvalue-discard -Wconf:msg=non-Unit:s
1+
//> using options -Xfatal-warnings -Wvalue-discard -Wconf:msg=non-Unit:s
22

33
import scala.collection.mutable
44
import scala.annotation.nowarn

tests/pos-special/fatal-warnings/i17741.scala renamed to tests/pos/i17741.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// scalac: -Wnonunit-statement
1+
//> using options -Xfatal-warnings -Wnonunit-statement
22

33
class Node()
44
class Elem(
@@ -29,4 +29,4 @@ object Main {
2929
)
3030
}
3131
}: @annotation.nowarn()
32-
}
32+
}

tests/pos-special/fatal-warnings/nowarnannot.scala renamed to tests/pos/nowarnannot.scala

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//> using options -Xfatal-warnings -Wvalue-discard
2+
13
case class F(i: Int)
24

35
object Main {

0 commit comments

Comments
 (0)