Skip to content

Commit 3fa63cb

Browse files
committed
Add isTupleType documentation
1 parent 302f972 commit 3fa63cb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,10 +2526,10 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
25262526
*/
25272527
def isDependentFunctionType: Boolean
25282528

2529-
/** Is this type a tuple type?
2530-
*
2531-
* @return true if the dealiased type of `self` without refinement is `TupleN[T1, T2, ..., Tn]`
2532-
*/
2529+
/** Is this type a `TupleN` type?
2530+
*
2531+
* @return true if the dealiased type of `self` is `TupleN[T1, T2, ..., Tn]`
2532+
*/
25332533
def isTupleType: Boolean
25342534

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

0 commit comments

Comments
 (0)