Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ enum ErrorMessageID(val isActive: Boolean = true) extends java.lang.Enum[ErrorMe
case OnlyFullyDependentAppliedConstructorTypeID // errorNumber: 212
case PointlessAppliedConstructorTypeID // errorNumber: 213
case IllegalContextBoundsID // errorNumber: 214
case NamedPatternNotApplicableID // errorNumber: 215

def errorNumber = ordinal - 1

Expand Down
6 changes: 5 additions & 1 deletion compiler/src/dotty/tools/dotc/reporting/messages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3262,4 +3262,8 @@ final class IllegalContextBounds(using Context) extends SyntaxMsg(IllegalContext

override protected def explain(using Context): String = ""

end IllegalContextBounds
final class NamedPatternNotApplicable(selectorType: Type)(using Context) extends PatternMatchMsg(NamedPatternNotApplicableID):
override protected def msg(using Context): String =
i"Named patterns cannot be used with $selectorType, because it is not a named tuple or case class"

override protected def explain(using Context): String = ""