Closed keirlawson closed 1 year ago
This bug is not directly related to doctool. The problem lies in compilation from tasty which is run by Scaladoc under the hood. Running the following command:
scalac -classpath <classpath_from_sbt> --from-tasty target/scala-3.1.2-RC1-bin-20211213-8e1054e-NIGHTLY/classes/example/DottyCylicalRefError.tasty
produces the same error:
exception caught when loading trait Builder: Cyclic reference involving object GetLogEventsRequest
exception caught when loading module class GetLogEventsRequest$: Cyclic reference involving object GetLogEventsRequest
Cyclic reference involving object GetLogEventsRequest while compiling target/scala-3.1.2-RC1-bin-20211213-8e1054e-NIGHTLY/classes/example/DottyCylicalRefError.tasty
Exception in thread "main" dotty.tools.dotc.core.CyclicReference:
at dotty.tools.dotc.core.CyclicReference$.apply(TypeErrors.scala:155)
at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:166)
at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:188)
at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:190)
at dotty.tools.dotc.core.classfile.ClassfileParser$innerClasses$.getMember$1(ClassfileParser.scala:1060)
at dotty.tools.dotc.core.classfile.ClassfileParser$innerClasses$.classSymbol(ClassfileParser.scala:1072)
at dotty.tools.dotc.core.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:114)
at dotty.tools.dotc.core.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:396)
at dotty.tools.dotc.core.classfile.ClassfileParser.processTypeArgs$1(ClassfileParser.scala:383)
at dotty.tools.dotc.core.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:398)
at dotty.tools.dotc.core.classfile.ClassfileParser.dotty$tools$dotc$core$classfile$ClassfileParser$$sigToType(ClassfileParser.scala:522)
at dotty.tools.dotc.core.classfile.ClassfileParser$AttributeCompleter.complete(ClassfileParser.scala:665)
at dotty.tools.dotc.core.classfile.ClassfileParser.parseClass(ClassfileParser.scala:190)
at dotty.tools.dotc.core.classfile.ClassfileParser.$anonfun$1(ClassfileParser.scala:87)
...
Compiler version
3.1.0
Minimized code
Based on https://github.com/chadselph/reproduce-dotty-cyclical-error
Output
Expectation
No cyclic reference as
compile
passes fine.