Skip to content

Commit e772dbb

Browse files
committed
Improve a comment in Inliner
1 parent 4a8e553 commit e772dbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,8 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
955955
val selType = if (sel.isEmpty) wideSelType else sel.tpe
956956
reduceInlineMatch(sel, selType, cases.asInstanceOf[List[CaseDef]], this) match {
957957
case Some((caseBindings, rhs0)) =>
958-
// drop type ascriptions/casts hiding internal types (which are now aliases after reducing the match)
958+
// drop type ascriptions/casts hiding pattern-bound types (which are now aliases after reducing the match)
959+
// note that any actually necessary casts will be reinserted by the typing pass below
959960
val rhs1 = rhs0 match {
960961
case Block(stats, t) if t.pos.isSynthetic =>
961962
t match {

0 commit comments

Comments
 (0)