Skip to content

Commit fa98f51

Browse files
authored
Merge pull request #6932 from dotty-staging/fix-#6436
Fix #6436: Add regression test
2 parents 4f36b60 + 49ee05e commit fa98f51

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/neg/i6436.check

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- Error: tests/neg/i6436.scala:5:9 ------------------------------------------------------------------------------------
2+
5 | case '{ StringContext(${ExprSeq(parts)}: _*) } => // error
3+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
| no implicit argument of type scala.quoted.QuoteContext was found
5+
-- [E006] Unbound Identifier Error: tests/neg/i6436.scala:6:34 ---------------------------------------------------------
6+
6 | val ps: Seq[Expr[String]] = parts // error
7+
| ^^^^^
8+
| Not found: parts
9+
10+
longer explanation available when compiling with `-explain`

tests/neg/i6436.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import scala.quoted._
2+
import scala.quoted.matching._
3+
def f(sc: quoted.Expr[StringContext]): Unit = {
4+
sc match {
5+
case '{ StringContext(${ExprSeq(parts)}: _*) } => // error
6+
val ps: Seq[Expr[String]] = parts // error
7+
}
8+
}

0 commit comments

Comments
 (0)