Skip to content

Commit ee09bea

Browse files
committed
Avoid NotDefinedHere error in FirstTransform.
We saw a NotDefinedHere error for `dotc t2310.scala`: demanding denotation of module class None$ at phase firstTransform(3) outside defined interval: defined periods are Period(4..8, run = 2) Period(1..2, run = 2) This is weird. Period 3 (which is FirstTransform) was missing. I don't know why, but the problem goes away if we make InstChecks an IdentityTransformer. @DarkDimius: Do you have an idea why this could be? Is there soemthing which requires FirstTransform immediately after Typer?
1 parent db0e6c9 commit ee09bea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import Types._, Symbols._, Flags._, StdNames._
99
import util.Positions._
1010
import ast.Trees._
1111
import typer.ErrorReporting._
12+
import DenotTransformers._
1213

1314
/** This checks `New` nodes, verifying that they can be instantiated. */
14-
class InstChecks extends Phase {
15+
class InstChecks extends Phase with IdentityDenotTransformer {
1516
import ast.tpd._
1617

1718
override def phaseName: String = "instchecks"

0 commit comments

Comments
 (0)