Skip to content

Commit 058105b

Browse files
committed
Fix #5547: Add regression test
The preciseness of the error message was already improved in #6804.
1 parent 15b9cd8 commit 058105b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/pos/i5547.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import scala.quoted._
2+
3+
object scalatest {
4+
inline def assert1(condition: => Boolean): Unit =
5+
${assertImpl('condition, '{""})}
6+
7+
inline def assert2(condition: => Boolean): Unit =
8+
${ assertImpl('condition, "".toExpr) }
9+
10+
def assertImpl(condition: Expr[Boolean], clue: Expr[Any]) given QuoteContext: Expr[Unit] =
11+
'{}
12+
}

0 commit comments

Comments
 (0)