Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport "Fix TermRef prefixes not having their type healed" to LTS #21038

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/staging/HealType.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class HealType(pos: SrcPos)(using Context) extends TypeMap {
case tp: TermRef =>
val inconsistentRoot = levelInconsistentRootOfPath(tp)
if inconsistentRoot.exists then levelError(inconsistentRoot, tp, pos)
else tp
else mapOver(tp)
case tp: AnnotatedType =>
derivedAnnotatedType(tp, apply(tp.parent), tp.annot)
case _ =>
Expand Down
7 changes: 7 additions & 0 deletions tests/pos-macros/i19767.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import scala.quoted.*

class ICons[K <: Singleton](val key: K)

def filterX(using Quotes): Unit =
(??? : Expr[Any]) match
case '{ $y : ICons[k1] } => '{ ICons($y.key) }