aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 648713571..0abaa17fe 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -204,10 +204,10 @@ trait Applications extends Compatibility { self: Typer =>
def findDefault(cx: Context): Type = {
if (cx eq NoContext) NoType
else if (cx.scope != cx.outer.scope &&
- cx.denotsNamed(methRef.name)
- .filterWithPredicate(_.symbol == meth).exists) {
- val denot = cx.denotsNamed(getterName).toDenot(NoPrefix)
- NamedType(NoPrefix, getterName).withDenot(denot)
+ cx.denotNamed(methRef.name).hasAltWith(_.symbol == meth)) {
+ val denot = cx.denotNamed(getterName)
+ assert(denot.exists)
+ NamedType(cx.owner.thisType, getterName).withDenot(denot)
} else findDefault(cx.outer)
}
findDefault(ctx)