@@ -1812,12 +1812,12 @@ class NotAPath(tp: Type, usage: String)(using Context) extends TypeMsg(NotAPathI
18121812 if sym.isAllOf(Flags .InlineParam ) then
18131813 i """
18141814 |Inline parameters are not considered immutable paths and cannot be used as
1815- |singleton types.
1816- |
1815+ |singleton types.
1816+ |
18171817 |Hint: Removing the `inline` qualifier from the ` ${sym.name}` parameter
18181818 |may help resolve this issue. """
18191819 else " "
1820-
1820+
18211821
18221822class WrongNumberOfParameters (tree : untpd.Tree , foundCount : Int , pt : Type , expectedCount : Int )(using Context )
18231823 extends SyntaxMsg (WrongNumberOfParametersID ) {
@@ -3173,15 +3173,21 @@ final class QuotedTypeMissing(tpe: Type)(using Context) extends StagingMessage(Q
31733173
31743174 private def witness = defn.QuotedTypeClass .typeRef.appliedTo(tpe)
31753175
3176- override protected def msg (using Context ): String =
3176+ override protected def msg (using Context ): String =
31773177 i " Reference to $tpe within quotes requires a given ${witness} in scope "
31783178
31793179 override protected def explain (using Context ): String =
3180- i """ Referencing ` $tpe` inside a quoted expression requires a ` ${witness}` to be in scope.
3180+ i """ Referencing ` $tpe` inside a quoted expression requires a ` ${witness}` to be in scope.
31813181 |Since Scala is subject to erasure at runtime, the type information will be missing during the execution of the code.
3182- |` ${witness}` is therefore needed to carry ` $tpe`'s type information into the quoted code.
3183- |Without an implicit ` ${witness}`, the type ` $tpe` cannot be properly referenced within the expression.
3182+ |` ${witness}` is therefore needed to carry ` $tpe`'s type information into the quoted code.
3183+ |Without an implicit ` ${witness}`, the type ` $tpe` cannot be properly referenced within the expression.
31843184 |To resolve this, ensure that a ` ${witness}` is available, either through a context-bound or explicitly.
31853185 | """
31863186
31873187end QuotedTypeMissing
3188+
3189+ final class EnumMayNotBeValueClasses (sym : Symbol )(using Context ) extends SyntaxMsg (EnumMayNotBeValueClassesID ):
3190+ def msg (using Context ): String = i " $sym may not be a value class "
3191+
3192+ def explain (using Context ) = " "
3193+ end EnumMayNotBeValueClasses
0 commit comments