Skip to content

Commit f3ea3ce

Browse files
Update doc
1 parent c9ef33f commit f3ea3ce

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,24 +1519,24 @@ object Types extends TypeUtils {
15191519
}
15201520
deskolemizer(this)
15211521

1522-
/** Contant fold applied compiletime ops if possible */
1522+
/** Constant fold applied compiletime operations if possible */
15231523
final def compiletimeConstantFolded(using Context) = this match
15241524
case tp: AppliedType => tp.tryCompiletimeConstantFold.orElse(this)
15251525
case tp => tp
15261526

1527-
/** The result of normalization using `tryNormalize`, or the type itself if
1528-
* tryNormlize yields NoType
1529-
*/
1527+
/** The result of normalization, or the type itself if none apply. */
15301528
final def normalized(using Context): Type = tryNormalize.orElse(this)
15311529

1532-
/** If this type can be normalized at the top-level by rewriting match types
1533-
* of S[n] types, the result after applying all toplevel normalizations,
1534-
* otherwise NoType
1530+
/** If this type has an underlying match type, the result after applying all
1531+
* toplevel normalizations, otherwise NoType.
15351532
*/
15361533
def tryNormalize(using Context): Type = underlyingMatchType match
15371534
case mt: MatchType => mt.reduced.normalized
15381535
case _ => NoType
15391536

1537+
/** Perform successive dealiasings and beta-reductions of applied types until
1538+
* a match type is reached if any, otherwise NoType.
1539+
*/
15401540
def underlyingMatchType(using Context): Type = this.safeDealias.stripLazyRef match
15411541
case tp: MatchType => tp
15421542
case tp: AppliedType => tp.underlyingMatchType

0 commit comments

Comments
 (0)