Skip to content

Commit 95fd03e

Browse files
Merge pull request #6262 from dotty-staging/fix-test
Update compile-time stripMargin
2 parents 0c95f6e + 09436e9 commit 95fd03e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/run-with-compiler/reflect-inline/assert_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import scala.quoted._
22
import scala.tasty._
33

44
object api {
5-
inline def (inline x: String) strip <: String =
5+
inline def (inline x: String) stripMargin <: String =
66
${ stripImpl(x) }
77

88
private def stripImpl(x: String)(implicit refl: Reflection): Expr[String] =

tests/run-with-compiler/reflect-inline/test_2.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import api._
22

33
object Test {
44
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")
79
}
810
}

0 commit comments

Comments
 (0)