File tree 3 files changed +3
-3
lines changed
compiler/src/dotty/tools/dotc
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ object desugar {
39
39
* case class method that clashes with a user-defined method?
40
40
*/
41
41
def isRetractableCaseClassMethodName (name : Name )(implicit ctx : Context ): Boolean = name match {
42
- case nme.apply | nme.unapply | nme.copy => true
42
+ case nme.apply | nme.unapply | nme.unapplySeq | nme. copy => true
43
43
case DefaultGetterName (nme.copy, _) => true
44
44
case _ => false
45
45
}
Original file line number Diff line number Diff line change @@ -804,7 +804,7 @@ object SymDenotations {
804
804
805
805
def isInlineMethod (implicit ctx : Context ): Boolean =
806
806
is(InlineMethod , butNot = AccessorOrSynthetic ) &&
807
- name != nme.unapply // unapply methods do not count as inline methods
807
+ ! name.isUnapplyName // unapply methods do not count as inline methods
808
808
// we need an inline flag on them only do that
809
809
// reduceProjection gets access to their rhs
810
810
Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
460
460
changePrec(OrPrec ) { toText(trees, " | " ) }
461
461
case UnApply (fun, implicits, patterns) =>
462
462
val extractor = fun match {
463
- case Select (extractor, nme.unapply) => extractor
463
+ case Select (extractor, name) if name.isUnapplyName => extractor
464
464
case _ => fun
465
465
}
466
466
toTextLocal(extractor) ~
You can’t perform that action at this time.
0 commit comments