File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -796,9 +796,9 @@ class Definitions {
796
796
797
797
/** Is this type eligible for name based pattern matching?
798
798
*
799
- * That means either extending `scala.ProductN` or `NameBasedPattern`.
800
- * Ideally only the second condition should be used, first on is kept
801
- * for compatibility with scala2 compiled case classes .
799
+ * That means either extending `scala.ProductN` OR `NameBasedPattern`.
800
+ * In the long term, we can remove the first condition by having
801
+ * `scala.ProductN` inherit `NameBasedPattern` .
802
802
*/
803
803
def isNameBasedPatternSubType (tp : Type )(implicit ctx : Context ) =
804
804
(tp.derivesFrom(ProductType .symbol) && tp.baseClasses.exists(isProductClass)) ||
You can’t perform that action at this time.
0 commit comments