Skip to content

Commit f70ae54

Browse files
committed
Remove hackIsTupleType
1 parent cff28af commit f70ae54

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ trait InkuireSupport:
150150
params = typeList.init.map(p => Inkuire.Contravariance(inner(p, vars))) :+ Inkuire.Covariance(inner(typeList.last, vars)),
151151
itid = Some(Inkuire.ITID(s"${name}scala.${name}//[]", isParsed = false))
152152
)
153-
else if t.isTupleType then
153+
else if t.isTupleN then
154154
val name = s"Tuple${typeList.size}"
155155
Inkuire.Type(
156156
name = Inkuire.TypeName(name),

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,9 @@ import scala.quoted._
66
object SyntheticsSupport:
77

88
extension (using Quotes)(t: reflect.TypeRepr)
9-
def isTupleType: Boolean = t.hackIsTupleType(t)
109

1110
def isCompiletimeAppliedType: Boolean = t.hackIsCompiletimeAppliedType(t)
1211

13-
private def hackIsTupleType(rtpe: reflect.TypeRepr): Boolean =
14-
import dotty.tools.dotc
15-
given ctx: dotc.core.Contexts.Context = quotes.asInstanceOf[scala.quoted.runtime.impl.QuotesImpl].ctx
16-
val tpe = rtpe.asInstanceOf[dotc.core.Types.Type]
17-
ctx.definitions.isTupleNType(tpe)
18-
1912
private def hackIsCompiletimeAppliedType(rtpe: reflect.TypeRepr): Boolean =
2013
import dotty.tools.dotc
2114
given ctx: dotc.core.Contexts.Context = quotes.asInstanceOf[scala.quoted.runtime.impl.QuotesImpl].ctx

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ trait TypesSupport:
187187
partOfSignature ++ texts(" => ") ++ inner(rtpe)
188188
case args =>
189189
texts("(") ++ commas(args.init.map(inner)) ++ texts(") => ") ++ inner(args.last)
190-
else if t.isTupleType then
190+
else if t.isTupleN then
191191
typeList match
192192
case Nil =>
193193
Nil

0 commit comments

Comments
 (0)