aboutsummaryrefslogtreecommitdiff
path: root/doc-tool/src/dotty/tools/dottydoc/model/references.scala
diff options
context:
space:
mode:
Diffstat (limited to 'doc-tool/src/dotty/tools/dottydoc/model/references.scala')
-rw-r--r--doc-tool/src/dotty/tools/dottydoc/model/references.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc-tool/src/dotty/tools/dottydoc/model/references.scala b/doc-tool/src/dotty/tools/dottydoc/model/references.scala
index a28148fa7..766b2a340 100644
--- a/doc-tool/src/dotty/tools/dottydoc/model/references.scala
+++ b/doc-tool/src/dotty/tools/dottydoc/model/references.scala
@@ -17,4 +17,12 @@ object references {
final case class UnsetLink(title: String, query: String) extends MaterializableLink
final case class MaterializedLink(title: String, target: String) extends MaterializableLink
final case class NoLink(title: String, target: String) extends MaterializableLink
+
+ object AndOrTypeReference {
+ def unapply(ref: Reference): Option[(Reference, String, Reference)] = ref match {
+ case OrTypeReference(left, right) => Some((left, "|", right))
+ case AndTypeReference(left, right) => Some((left, "&", right))
+ case _ => None
+ }
+ }
}