Skip to content

Commit 71a66c4

Browse files
committed
Fix checks outside of testCompilation
1 parent 9dbd8aa commit 71a66c4

File tree

7 files changed

+26
-7
lines changed

7 files changed

+26
-7
lines changed
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
//> using options -source:future-migration -deprecation -Werror
22
scala> import scala.util._
3-
-- Error: ----------------------------------------------------------------------
3+
-- Migration Warning: ----------------------------------------------------------
44
1 | import scala.util._
55
| ^
66
| `_` is no longer supported for a wildcard import; use `*` instead
7-
7+
No warnings can be incurred under -Werror.
8+
1 warning found
9+
1 error found
810
scala> extension (x: Int) def foo(y: Int) = x + y
911
def foo(x: Int)(y: Int): Int
10-
1112
scala> 2 foo 4
12-
-- Error: ----------------------------------------------------------------------
13+
-- Migration Warning: ----------------------------------------------------------
1314
1 | 2 foo 4
1415
| ^^^
1516
|Alphanumeric method foo is not declared infix; it should not be used as infix operator.
1617
|Instead, use method syntax .foo(...) or backticked identifier `foo`.
17-
1 error found
18+
No warnings can be incurred under -Werror.
19+
1 warning found
20+
1 error found

tests/neg-macros/i9570.check

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Warning: tests/neg-macros/i9570.scala:15:21 -------------------------------------------------------------------------
2+
15 | case '{HCons(_,$t)} => // warn (in .check file)
3+
| ^
4+
| Use of `_` for lambda in quoted pattern. Use explicit lambda instead or use `$_` to match any term.
5+
No warnings can be incurred under -Werror.

tests/neg-macros/i9570.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ object Macros {
1212
private def sizeImpl(e: Expr[HList], n:Int)(using qctx:Quotes): Expr[Int] = {
1313
import quotes.reflect.*
1414
e match {
15-
case '{HCons(_,$t)} => // error if run with fatal warinings in BootstrappedOnlyCompilationTests
15+
case '{HCons(_,$t)} => // warn (in .check file)
1616
sizeImpl(t,n+1)
1717
case '{HNil} => Expr(n)
1818
}
@@ -24,3 +24,5 @@ object Macros {
2424

2525
}
2626
}
27+
28+
// nopos-error No warnings can be incurred under -Werror.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Deprecation Warning: tests/neg-macros/macro-deprecation.scala:5:18 --------------------------------------------------
2+
5 |inline def f = ${ impl } // warn (in .check file)
3+
| ^^^^
4+
| method impl is deprecated
5+
No warnings can be incurred under -Werror.

tests/neg-macros/macro-deprecation.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22

33
import scala.quoted.*
44

5-
inline def f = ${ impl } // error
5+
inline def f = ${ impl } // warn (in .check file)
66
@deprecated def impl(using Quotes) = '{1}
7+
8+
// nopos-error No warnings can be incurred under -Werror.

tests/patmat/i14407.dupe.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
6: Match case Unreachable
2+
0: No Kind

tests/patmat/i18118.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
21: Pattern Match
33
32: Pattern Match
44
41: Pattern Match
5+
0: No Kind

0 commit comments

Comments
 (0)