File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
tests/run-with-compiler/reflect-inline Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import scala.quoted._
2
2
import scala .tasty ._
3
3
4
4
object api {
5
- inline def (inline x : String ) strip <: String =
5
+ inline def (inline x : String ) stripMargin <: String =
6
6
$ { stripImpl(x) }
7
7
8
8
private def stripImpl (x : String )(implicit refl : Reflection ): Expr [String ] =
Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ import api._
2
2
3
3
object Test {
4
4
def main (args : Array [String ]): Unit = {
5
- assert(typeChecks(" 1 + 1" .strip))
6
- assert(scala.testing.typeChecks(" 1 + 1" .strip))
5
+ val a : String = " 5"
6
+ assert(typeChecks(" |1 + 1" .stripMargin))
7
+ assert(scala.testing.typeChecks(" |1 + 1" .stripMargin))
8
+ assert((" |3 + " + a).stripMargin == " 3 + 5" )
7
9
}
8
10
}
You can’t perform that action at this time.
0 commit comments