Skip to content

Commit

Permalink
Fix boostrappedOnly tests
Browse files Browse the repository at this point in the history
  • Loading branch information
szymon-rd committed Dec 18, 2023
1 parent cbd21c9 commit f21b0f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
5 changes: 2 additions & 3 deletions tests/neg-macros/i9570.check
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- Warning: tests/neg-macros/i9570.scala:15:21 -------------------------------------------------------------------------
15 | case '{HCons(_,$t)} => // warn (in .check file)
-- Error: tests/neg-macros/i9570.scala:15:21 ---------------------------------------------------------------------------
15 | case '{HCons(_,$t)} => // error
| ^
| Use of `_` for lambda in quoted pattern. Use explicit lambda instead or use `$_` to match any term.
No warnings can be incurred under -Werror.
6 changes: 2 additions & 4 deletions tests/neg-macros/i9570.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ object Macros {
private def sizeImpl(e: Expr[HList], n:Int)(using qctx:Quotes): Expr[Int] = {
import quotes.reflect.*
e match {
case '{HCons(_,$t)} => // warn (in .check file)
case '{HCons(_,$t)} => // error
sizeImpl(t,n+1)
case '{HNil} => Expr(n)
}
}

inline def size(inline expr: HList ): Int = {
${sizeImpl('expr,0)}
}
}

}
}

// nopos-error No warnings can be incurred under -Werror.
5 changes: 2 additions & 3 deletions tests/neg-macros/macro-deprecation.check
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- Deprecation Warning: tests/neg-macros/macro-deprecation.scala:5:18 --------------------------------------------------
5 |inline def f = ${ impl } // warn (in .check file)
-- Error: tests/neg-macros/macro-deprecation.scala:5:18 ----------------------------------------------------------------
5 |inline def f = ${ impl } // error
| ^^^^
| method impl is deprecated
No warnings can be incurred under -Werror.
6 changes: 2 additions & 4 deletions tests/neg-macros/macro-deprecation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@

import scala.quoted.*

inline def f = ${ impl } // warn (in .check file)
@deprecated def impl(using Quotes) = '{1}

// nopos-error No warnings can be incurred under -Werror.
inline def f = ${ impl } // error
@deprecated def impl(using Quotes) = '{1}

0 comments on commit f21b0f3

Please sign in to comment.