Skip to content

Commit 5f3de54

Browse files
committed
Add test
1 parent 69eb939 commit 5f3de54

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/pos-macros/i11835/X.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 X:
4+
inline def blah(inline b: Boolean = true): Unit =
5+
${ _blah('b) }
6+
7+
private def _blah(b: Expr[Boolean])(using Quotes): Expr[Unit] =
8+
import quotes.reflect.*
9+
println("="*120)
10+
println(b.asTerm)
11+
println(b.valueOrError)
12+
'{()}

tests/pos-macros/i11835/Y.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
object Y:
2+
X.blah(true) // ok
3+
X.blah() // error

0 commit comments

Comments
 (0)