Skip to content

Commit 3f15ee0

Browse files
committed
Add DocContext in DottyTest
Now that we check that the `DocContext` is set, we need to set it in the tests (or add `-Ydiscard-comments`, but this better reflects how Dotty is going to be used).
1 parent 4eed3f1 commit 3f15ee0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/test/dotty/tools/DottyTest.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package dotty
22
package tools
33

44
import dotc.core._
5+
import dotc.core.Comments.{ContextDoc, ContextDocstrings}
56
import dotc.core.Contexts._
67
import dotc.core.Symbols._
78
import dotc.core.Flags._
@@ -39,6 +40,7 @@ trait DottyTest extends ContextEscapeDetection {
3940
protected def initializeCtx(fc: FreshContext): Unit = {
4041
fc.setSetting(fc.settings.encoding, "UTF8")
4142
fc.setSetting(fc.settings.classpath, Jars.dottyLib)
43+
fc.setProperty(ContextDoc, new ContextDocstrings)
4244
}
4345

4446
private def compilerWithChecker(phase: String)(assertion: (tpd.Tree, Context) => Unit) = new Compiler {

0 commit comments

Comments
 (0)