File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed
Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1- -- Error : tests/neg-macros/i9570.scala:15:21 -- -------------------------------------------------------------------------
2- 15 | case '{HCons(_,$t)} => // error
1+ -- Warning : tests/neg-macros/i9570.scala:15:21 -------------------------------------------------------------------------
2+ 15 | case '{HCons(_,$t)} => // warn (in .check file)
33 | ^
44 | 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,15 +12,17 @@ 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
15+ case ' {HCons (_,$t)} => // warn (in .check file)
1616 sizeImpl(t,n+ 1 )
1717 case ' {HNil } => Expr (n)
1818 }
1919 }
2020
2121 inline def size (inline expr : HList ): Int = {
2222 $ {sizeImpl(' expr ,0 )}
23- }
23+ }
2424
2525 }
2626}
27+
28+ // nopos-error No warnings can be incurred under -Werror.
Original file line number Diff line number Diff line change 1- -- Error : tests/neg-macros/macro-deprecation.scala:5:18 -------------- --------------------------------------------------
2- 5 |inline def f = ${ impl } // error
1+ -- Deprecation Warning : tests/neg-macros/macro-deprecation.scala:5:18 --------------------------------------------------
2+ 5 |inline def f = ${ impl } // warn (in .check file)
33 | ^^^^
44 | method impl is deprecated
5+ No warnings can be incurred under -Werror.
Original file line number Diff line number Diff line change 22
33import scala .quoted .*
44
5- inline def f = $ { impl } // error
6- @ deprecated def impl (using Quotes ) = ' {1 }
5+ inline def f = $ { impl } // warn (in .check file)
6+ @ deprecated def impl (using Quotes ) = ' {1 }
7+
8+ // nopos-error No warnings can be incurred under -Werror.
You can’t perform that action at this time.
0 commit comments