Skip to content

Commit 6571efa

Browse files
committed
Tweaks relative to error reporting
1 parent abba939 commit 6571efa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ object desugar {
786786
New(ref(defn.RepeatedAnnot.typeRef), Nil :: Nil),
787787
AppliedTypeTree(ref(seqClass.typeRef), t))
788788
} else {
789-
assert(ctx.mode.isExpr, ctx.mode)
789+
assert(ctx.mode.isExpr || ctx.reporter.hasErrors, ctx.mode)
790790
Select(t, op)
791791
}
792792
case PrefixOp(op, t) =>

src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ trait Checking {
232232

233233
/** Check that type `tp` is stable. */
234234
def checkStable(tp: Type, pos: Position)(implicit ctx: Context): Unit =
235-
if (!tp.isStable)
235+
if (!tp.isStable && !tp.isErroneous)
236236
ctx.error(d"$tp is not stable", pos)
237237

238238
/** Check that type `tp` is a legal prefix for '#'.

0 commit comments

Comments
 (0)