Closed
Description
Compiler version
3.3.1
Minimized code
import hello.bla.*
@main def hello =
test(1)
object kla:
def ra = ???
import kla.bla.ra1
@main def test =
ra1()
Output
Compiling project (Scala 3.3.1, JVM (17))
[error] ./test.scala:10:12
[error] Cyclic reference involving val <import>
[error] import kla.bla.ra1
[error] ^
Error compiling project (Scala 3.3.1, JVM (17))
Expectation
I would expect hello.bla
import highlighted first, as it makes no sense - import from a function
But if you comment out everything after the hello
function, you get only "test not found" error.
The "Cyclic reference" error is also confusing.