We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2729819 + bfd425f commit 759daf2Copy full SHA for 759daf2
compiler/src/dotty/tools/dotc/ast/Trees.scala
@@ -1324,7 +1324,8 @@ object Trees {
1324
this(this(x, arg), annot)
1325
case Thicket(ts) =>
1326
this(x, ts)
1327
- case _ if ctx.mode.is(Mode.Interactive) =>
+ case _ if ctx.reporter.errorsReported || ctx.mode.is(Mode.Interactive) =>
1328
+ // In interactive mode, errors might come from previous runs.
1329
// In case of errors it may be that typed trees point to untyped ones.
1330
// The IDE can still traverse inside such trees, either in the run where errors
1331
// are reported, or in subsequent ones.
tests/neg/i3487.scala
@@ -0,0 +1,4 @@
1
+object Test {
2
+ type &:[H, T] = Int
3
+ val a: F[Int] { type X = Int &: String } = ??? // error
4
+}
0 commit comments