Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/ast/Trees.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ object Trees {
this(this(x, arg), annot)
case Thicket(ts) =>
this(x, ts)
case _ if ctx.mode.is(Mode.Interactive) =>
case _ =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: replace with

case _ if ctx.errorsReported || ctx.mode.is(Mode.Interactive) =>

and adapt the comment to say that in interactive mode, errors might come from previous runs.

// In case of errors it may be that typed trees point to untyped ones.
// The IDE can still traverse inside such trees, either in the run where errors
// are reported, or in subsequent ones.
Expand Down
4 changes: 4 additions & 0 deletions tests/neg/i3487.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
object Test {
type &:[H, T] = Int
val a: F[Int] { type X = Int &: String } = ??? // error
}