Skip to content

Commit b593ea6

Browse files
committed
Add isTupleType documentation
1 parent 5a18ee3 commit b593ea6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

+4
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,10 @@ class Definitions {
14621462
def isPolymorphicAfterErasure(sym: Symbol): Boolean =
14631463
(sym eq Any_isInstanceOf) || (sym eq Any_asInstanceOf) || (sym eq Object_synchronized)
14641464

1465+
/** Is this type a `TupleN` type?
1466+
*
1467+
* @return true if the dealiased type of `self` is `TupleN[T1, T2, ..., Tn]`
1468+
*/
14651469
def isTupleType(tp: Type)(using Context): Boolean = {
14661470
val arity = tp.dealias.argInfos.length
14671471
arity <= MaxTupleArity && TupleType(arity) != null && tp.isRef(TupleType(arity).symbol)

library/src/scala/quoted/Quotes.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -2473,10 +2473,10 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
24732473
*/
24742474
def isDependentFunctionType: Boolean
24752475

2476-
/** Is this type a tuple type?
2477-
*
2478-
* @return true if the dealiased type of `self` without refinement is `TupleN[T1, T2, ..., Tn]`
2479-
*/
2476+
/** Is this type a `TupleN` type?
2477+
*
2478+
* @return true if the dealiased type of `self` is `TupleN[T1, T2, ..., Tn]`
2479+
*/
24802480
def isTupleType: Boolean
24812481

24822482
/** The type <this . sym>, reduced if possible */

0 commit comments

Comments
 (0)