File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
compiler/src/dotty/tools/dotc/staging Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class HealType(pos: SrcPos)(using Context) extends TypeMap {
7676 tp match
7777 case tp @ NamedType (NoPrefix , _) if level > levelOf(tp.symbol) => tp.symbol
7878 case tp : NamedType if ! tp.symbol.isStatic => levelInconsistentRootOfPath(tp.prefix)
79- case tp : ThisType if level > levelOf(tp.cls) => tp.cls
79+ case tp : ThisType if level > levelOf(tp.cls) && ! tp.cls.isRefinementClass => tp.cls
8080 case _ => NoSymbol
8181
8282 /** Try to heal reference to type `T` used in a higher level than its definition.
Original file line number Diff line number Diff line change 1+ import scala .quoted .*
2+
3+ def fooImpl (using Quotes ): Expr [Any ] =
4+ ' {
5+ new AnyRef {
6+ type T = Unit
7+ def make : T = ()
8+ def take (t : T ): Unit = ()
9+ }: {
10+ type T
11+ def make : T
12+ def take (t : T ): Unit
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments