Skip to content

Commit 26e3795

Browse files
Merge pull request #12099 from dotty-staging/fix-#9531
Add regression test
2 parents 183ec08 + 5a4fac8 commit 26e3795

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ object desugar {
946946
tree.withMods(mods)
947947
else if tree.name.startsWith("$") && !tree.isBackquoted then
948948
report.error(
949-
"""Quoted pattern variable names starting with $ are not suported anymore.
949+
"""Quoted pattern variable names starting with $ are not supported anymore.
950950
|Use lower cases type pattern name instead.
951951
|""".stripMargin,
952952
tree.srcPos)

tests/pos/i9531.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
trait Scope:
2+
type Expr[+T]
3+
4+
def exprQuote[T](x: T)(using s: Scope, dummy: Null = null): s.Expr[T] = ???
5+
def exprQuote[T <: Singleton](x: T)(using s: Scope): s.Expr[T] = ???
6+
7+
def test(using s: Scope): Unit =
8+
val t1: s.Expr[1] = exprQuote(1)
9+
val t2 = exprQuote(1)
10+
val t3: s.Expr[1] = t2

0 commit comments

Comments
 (0)