Skip to content

Commit 9c96800

Browse files
committed
Qualify assertion
1 parent 8750c14 commit 9c96800

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
366366
val denot = cx.denotNamed(getterName)
367367
if (denot.exists) ref(TermRef(cx.owner.thisType, getterName, denot))
368368
else {
369-
assert(ctx.mode.is(Mode.Interactive),
369+
assert(ctx.mode.is(Mode.Interactive) || ctx.reporter.errorsReported,
370370
s"non-existent getter denotation ($denot) for getter($getterName)")
371371
findGetter(cx.outer)
372372
}

tests/neg/parser-stability-3.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object x0 {
2+
def x0(x1: x2 = 0, x1 x3) x4 = // error // error // error
3+
x5 x6 x7[x8[x9 x2]] = x0
4+
val x10 = x0( ) // error // error

0 commit comments

Comments
 (0)