We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef0a001 commit 4de288bCopy full SHA for 4de288b
tests/neg-macros/reflect-inline/assert_1.scala
@@ -0,0 +1,10 @@
1
+import scala.quoted._
2
+
3
+object api {
4
+ inline def (inline x: String) stripMargin2: String =
5
+ ${ stripImpl(x) }
6
7
+ private def stripImpl(x: String)(given qctx: QuoteContext): Expr[String] =
8
+ Expr(x.stripMargin)
9
10
+}
tests/neg-macros/reflect-inline/test_2.scala
@@ -0,0 +1,6 @@
+import api._
+class Test {
+ val a: String = "5"
+ a.stripMargin2 // error: `a should be a known constant
0 commit comments