Skip to content

Commit e7e364a

Browse files
Merge pull request #8003 from dotty-staging/fix-#8002
Fix #8002: Drop wrong assertion
2 parents db233d4 + 13bc962 commit e7e364a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,7 @@ trait Applications extends Compatibility {
484484
cx.denotNamed(meth.name).hasAltWith(_.symbol == meth)) {
485485
val denot = cx.denotNamed(getterName)
486486
if (denot.exists) ref(TermRef(cx.owner.thisType, getterName, denot))
487-
else {
488-
assert(ctx.mode.is(Mode.Interactive) || ctx.reporter.errorsReported,
489-
s"non-existent getter denotation ($denot) for getter($getterName)")
490-
findGetter(cx.outer)
491-
}
487+
else findGetter(cx.outer)
492488
}
493489
else findGetter(cx.outer)
494490
findGetter(ctx)

tests/neg/i8002.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class Foo
2+
def f(x: Int, y: Int = 1) = ???
3+
4+
object bar extends Foo
5+
f() // error: missing argument

0 commit comments

Comments
 (0)