effekt
effekt copied to clipboard
Cyclic reference involving class Context
This PR is a minimalization of an incremental compilation error that we consistently hit, when modifying our Typer.scala
.
(reported here: https://github.com/scala/scala3/issues/20245)
Steps to reproduce:
sbt> clean
sbt> compile
Modify a line in Typer.scala
https://github.com/effekt-lang/effekt/blob/34b9e79126db91604df4785aaabace15d154f8cb/effekt/shared/src/main/scala/effekt/Typer.scala#L12-L21
sbt> compile
Observed result:
[error] -- [E046] Cyclic Error: /private/tmp/effekt/effekt/shared/src/main/scala/effekt/Typer.scala:15:57
[error] 15 | private[typer] val unification = new Unification(using this)
[error] | ^
[error] | Cyclic reference involving class Context
[error] |
[error] | longer explanation available when compiling with `-explain`
[error] one error found
[error] (root / Compile / compileIncremental) Compilation failed