Skip to content

Commit 5946ef8

Browse files
committed
enable snippet compiler on reference docs for new-types
The change in unin-types-spec.md is workaround. It should be `sc:fail` instead of `sc:nocompile`, but it causes generateReferenceDocumentation task to fail with MissingCoreLibraryException.
1 parent bc7c425 commit 5946ef8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/_docs/reference/new-types/union-types-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ The members of a union type are the members of its join.
156156
The following code does not typecheck, because method `hello` is not a member of
157157
`AnyRef` which is the join of `A | B`.
158158

159-
```scala
159+
```scala sc:nocompile
160160
trait A { def hello: String }
161161
trait B { def hello: String }
162162

project/Build.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,6 +2360,7 @@ object ScaladocConfigs {
23602360
.add(DocumentSyntheticTypes(true))
23612361
.add(SnippetCompiler(List(
23622362
s"${dottyLibRoot}/scala=compile",
2363+
"docs/_docs/reference/new-types=compile"
23632364
)))
23642365
.add(SiteRoot("docs"))
23652366
.add(ApiSubdirectory(true))

0 commit comments

Comments
 (0)