File tree 7 files changed +26
-7
lines changed
compiler/test-resources/repl
7 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 1
1
//> using options -source:future-migration -deprecation -Werror
2
2
scala> import scala.util._
3
- -- Error: ------------ ----------------------------------------------------------
3
+ -- Migration Warning: ----------------------------------------------------------
4
4
1 | import scala.util._
5
5
| ^
6
6
| `_` 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
8
10
scala> extension (x: Int) def foo(y: Int) = x + y
9
11
def foo(x: Int)(y: Int): Int
10
-
11
12
scala> 2 foo 4
12
- -- Error: ------------ ----------------------------------------------------------
13
+ -- Migration Warning: ----------------------------------------------------------
13
14
1 | 2 foo 4
14
15
| ^^^
15
16
|Alphanumeric method foo is not declared infix; it should not be used as infix operator.
16
17
|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
Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ object Macros {
12
12
private def sizeImpl (e : Expr [HList ], n: Int )(using qctx: Quotes ): Expr [Int ] = {
13
13
import quotes .reflect .*
14
14
e match {
15
- case ' {HCons (_,$t)} => // error if run with fatal warinings in BootstrappedOnlyCompilationTests
15
+ case ' {HCons (_,$t)} => // warn ( in .check file)
16
16
sizeImpl(t,n+ 1 )
17
17
case ' {HNil } => Expr (n)
18
18
}
@@ -24,3 +24,5 @@ object Macros {
24
24
25
25
}
26
26
}
27
+
28
+ // nopos-error No warnings can be incurred under -Werror.
Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change 2
2
3
3
import scala .quoted .*
4
4
5
- inline def f = $ { impl } // error
5
+ inline def f = $ { impl } // warn (in .check file)
6
6
@ deprecated def impl (using Quotes ) = ' {1 }
7
+
8
+ // nopos-error No warnings can be incurred under -Werror.
Original file line number Diff line number Diff line change 1
1
6: Match case Unreachable
2
+ 0: No Kind
Original file line number Diff line number Diff line change 2
2
21: Pattern Match
3
3
32: Pattern Match
4
4
41: Pattern Match
5
+ 0: No Kind
You can’t perform that action at this time.
0 commit comments