File tree 1 file changed +7
-7
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1519,24 +1519,24 @@ object Types extends TypeUtils {
1519
1519
}
1520
1520
deskolemizer(this )
1521
1521
1522
- /** Contant fold applied compiletime ops if possible */
1522
+ /** Constant fold applied compiletime operations if possible */
1523
1523
final def compiletimeConstantFolded (using Context ) = this match
1524
1524
case tp : AppliedType => tp.tryCompiletimeConstantFold.orElse(this )
1525
1525
case tp => tp
1526
1526
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. */
1530
1528
final def normalized (using Context ): Type = tryNormalize.orElse(this )
1531
1529
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.
1535
1532
*/
1536
1533
def tryNormalize (using Context ): Type = underlyingMatchType match
1537
1534
case mt : MatchType => mt.reduced.normalized
1538
1535
case _ => NoType
1539
1536
1537
+ /** Perform successive dealiasings and beta-reductions of applied types until
1538
+ * a match type is reached if any, otherwise NoType.
1539
+ */
1540
1540
def underlyingMatchType (using Context ): Type = this .safeDealias.stripLazyRef match
1541
1541
case tp : MatchType => tp
1542
1542
case tp : AppliedType => tp.underlyingMatchType
You can’t perform that action at this time.
0 commit comments