We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34a2b96 commit c566e60Copy full SHA for c566e60
compiler/src/dotty/tools/dotc/typer/Applications.scala
@@ -366,8 +366,12 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
366
else if (cx.scope != cx.outer.scope &&
367
cx.denotNamed(meth.name).hasAltWith(_.symbol == meth)) {
368
val denot = cx.denotNamed(getterName)
369
- assert(denot.exists, s"non-existent getter denotation ($denot) for getter($getterName)")
370
- ref(TermRef(cx.owner.thisType, getterName, denot))
+ if (denot.exists) ref(TermRef(cx.owner.thisType, getterName, denot))
+ else {
371
+ assert(ctx.mode.is(Mode.Interactive),
372
+ s"non-existent getter denotation ($denot) for getter($getterName)")
373
+ findGetter(cx.outer)
374
+ }
375
} else findGetter(cx.outer)
376
}
377
findGetter(ctx)
0 commit comments