Skip to content

Commit 3e57b95

Browse files
authored
Merge pull request #4921 from lrytz/typo
fix typo in error message
2 parents dc13596 + b841ec0 commit 3e57b95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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
"\nYou 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
}

0 commit comments

Comments
 (0)