File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ object Applications {
5858
5959 /** Does `tp` fit the "get match" conditions as an unapply result type?
6060 * This is the case of `tp` has a `get` member as well as a
61- * parameterless `isDefined ` member of result type `Boolean`.
61+ * parameterless `isEmpty ` member of result type `Boolean`.
6262 */
6363 def isGetMatch (tp : Type , errorPos : Position = NoPosition )(implicit ctx : Context ) =
6464 extractorMemberType(tp, nme.isEmpty, errorPos).isRef(defn.BooleanClass ) &&
@@ -95,6 +95,7 @@ object Applications {
9595 val addendum =
9696 if (ctx.scala2Mode && unapplyName == nme.unapplySeq)
9797 " \n You might want to try to rewrite the extractor to use `unapply` instead."
98+ else " "
9899 ctx.error(em " $unapplyResult is not a valid result type of an $unapplyName method of an extractor $addendum" , pos)
99100 Nil
100101 }
You can’t perform that action at this time.
0 commit comments