File tree 1 file changed +2
-1
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ object Applications {
58
58
59
59
/** Does `tp` fit the "get match" conditions as an unapply result type?
60
60
* 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`.
62
62
*/
63
63
def isGetMatch (tp : Type , errorPos : Position = NoPosition )(implicit ctx : Context ) =
64
64
extractorMemberType(tp, nme.isEmpty, errorPos).isRef(defn.BooleanClass ) &&
@@ -95,6 +95,7 @@ object Applications {
95
95
val addendum =
96
96
if (ctx.scala2Mode && unapplyName == nme.unapplySeq)
97
97
" \n You might want to try to rewrite the extractor to use `unapply` instead."
98
+ else " "
98
99
ctx.error(em " $unapplyResult is not a valid result type of an $unapplyName method of an extractor $addendum" , pos)
99
100
Nil
100
101
}
You can’t perform that action at this time.
0 commit comments