Skip to content

Commit 795ecf5

Browse files
committed
Fix unreachable code
1 parent ffd2b97 commit 795ecf5

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,8 @@ trait TypesSupport:
2727
case ThisType(tpe) => inner(tpe)
2828
case AnnotatedType(tpe, _) => inner(tpe)
2929
case AppliedType(tpe, _) => inner(tpe)
30-
case tp @ TermRef(qual, typeName) =>
31-
qual match
32-
case _: TypeRepr | _: NoPrefix => Some(tp.termSymbol)
33-
case other => None
34-
case tp @ TypeRef(qual, typeName) =>
35-
qual match
36-
case _: TypeRepr | _: NoPrefix => Some(tp.typeSymbol)
37-
case other => None
30+
case tp @ TermRef(qual, typeName) => Some(tp.termSymbol)
31+
case tp @ TypeRef(qual, typeName) => Some(tp.typeSymbol)
3832

3933
val typeSymbol = extractTypeSymbol(method.returnTpt)
4034

@@ -204,8 +198,7 @@ trait TypesSupport:
204198
case tp @ TypeRef(qual, typeName) =>
205199
qual match {
206200
case r: RecursiveThis => texts(s"this.$typeName")
207-
case _: TypeRepr | _: NoPrefix => link(tp.typeSymbol)
208-
case other => noSupported(s"TypeRepr: $tp")
201+
case _: TypeRepr => link(tp.typeSymbol)
209202
}
210203
// convertTypeOrBoundsToReference(reflect)(qual) match {
211204
// case TypeReference(label, link, xs, _) => TypeReference(typeName, link + "/" + label, xs, true)

0 commit comments

Comments
 (0)