File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
compiler/src/dotty/tools/dotc/staging Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ class CrossStageSafety extends TreeMapWithStages {
6060 val healedType = healType(tree.srcPos)(tp1)
6161 if healedType == tree.tpe then tree
6262 else TypeTree (healedType).withSpan(tree.span)
63- case _ : RefTree if tree.isType =>
63+ case _ : RefTree | _ : SingletonTypeTree if tree.isType =>
6464 val healedType = healType(tree.srcPos)(tree.tpe)
6565 if healedType == tree.tpe then tree
6666 else TypeTree (healedType).withSpan(tree.span)
Original file line number Diff line number Diff line change 1+ import scala .quoted ._
2+
3+ def expr [X ](x : Any )(using Quotes ): Expr [Any ] =
4+ ' { foo[x.type ] } // error
5+ def foo [X ]: Any = ???
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ class Foo {
44
55 def f (using Quotes ): Unit = ' {
66 def bar [T ](x : T ): T = x
7- bar[
8- this .type // error
9- ] {
7+ bar[this .type ] {
108 this // error
119 }
1210 }
Original file line number Diff line number Diff line change 1+ import scala .quoted ._
2+ inline def foo (x : Any ): Any = $ { expr[x.type ] }
3+ def expr [X ](using Quotes ): Expr [Any ] = ???
You can’t perform that action at this time.
0 commit comments