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 @@ -843,9 +843,9 @@ class Definitions {
843843
844844 /** Is this type eligible for name based pattern matching?
845845 *
846- * That means either extending `scala.ProductN` or `NameBasedPattern`.
847- * Ideally only the second condition should be used, first on is kept
848- * for compatibility with scala2 compiled case classes .
846+ * That means either extending `scala.ProductN` OR `NameBasedPattern`.
847+ * In the long term, we can remove the first condition by having
848+ * `scala.ProductN` inherit `NameBasedPattern` .
849849 */
850850 def isNameBasedPatternSubType (tp : Type )(implicit ctx : Context ) =
851851 (tp.derivesFrom(ProductType .symbol) && tp.baseClasses.exists(isProductClass)) ||
You can’t perform that action at this time.
0 commit comments