We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.package
1 parent a68980c commit cb799beCopy full SHA for cb799be
src/dotty/tools/dotc/TypeErasure.scala
@@ -108,6 +108,10 @@ object TypeErasure {
108
def erasedRef(tp: Type)(implicit ctx: Context): Type = tp match {
109
case tp: TermRef =>
110
assert(tp.symbol.exists, tp)
111
+ if(tp.prefix.widenDealias.classSymbol.is(Flags.Package) && !tp.termSymbol.owner.is(Flags.Package))
112
+ // we are accessing a definition inside a package object
113
+ TermRef(erasedRef(tp.prefix).member(nme.PACKAGE).asSymDenotation.termRef, tp.symbol.asTerm)
114
+ else
115
TermRef(erasedRef(tp.prefix), tp.symbol.asTerm)
116
case tp: ThisType =>
117
tp
0 commit comments