@@ -3277,7 +3277,7 @@ extends SyntaxMsg(VolatileOnValID):
32773277 protected def explain (using Context ): String = " "
32783278
32793279class ConstructorProxyNotValue (sym : Symbol )(using Context )
3280- extends TypeMsg (ConstructorProxyNotValueID ):
3280+ extends TypeMsg (PhantomSymbolNotValueID ):
32813281 protected def msg (using Context ): String =
32823282 i " constructor proxy $sym cannot be used as a value "
32833283 protected def explain (using Context ): String =
@@ -3292,7 +3292,7 @@ extends TypeMsg(ConstructorProxyNotValueID):
32923292 |but not as a stand-alone value. """
32933293
32943294class ContextBoundCompanionNotValue (sym : Symbol )(using Context )
3295- extends TypeMsg (ConstructorProxyNotValueID ):
3295+ extends TypeMsg (PhantomSymbolNotValueID ):
32963296 protected def msg (using Context ): String =
32973297 i " context bound companion $sym cannot be used as a value "
32983298 protected def explain (using Context ): String =
@@ -3311,6 +3311,22 @@ extends TypeMsg(ConstructorProxyNotValueID):
33113311 |companion value with the (term-)name `A`. However, these context bound companions
33123312 |are not values themselves, they can only be referred to in selections. """
33133313
3314+ class DummyCaptureParamNotValue (sym : Symbol )(using Context )
3315+ extends TypeMsg (PhantomSymbolNotValueID ):
3316+ protected def msg (using Context ): String =
3317+ i " dummy term capture parameter $sym cannot be used as a value "
3318+ protected def explain (using Context ): String =
3319+ i """ A term capture parameter is a symbol made up by the compiler to represent a reference
3320+ |to a real capture parameter in capture sets. For instance, in
3321+ |
3322+ | class A:
3323+ | type C^
3324+ |
3325+ |there is just a type `A` declared but not a value `A`. Nevertheless, one can write
3326+ |the selection `(a: A).C` and use a a value, which works because the compiler created a
3327+ |term capture parameter for `C`. However, these term capture parameters are not real values,
3328+ |they can only be referred in capture sets. """
3329+
33143330class UnusedSymbol (errorText : String , val actions : List [CodeAction ] = Nil )(using Context )
33153331extends Message (UnusedSymbolID ):
33163332 def kind = MessageKind .UnusedSymbol
@@ -3518,7 +3534,7 @@ final class OnlyFullyDependentAppliedConstructorType()(using Context)
35183534 override protected def explain (using Context ): String = " "
35193535
35203536final class IllegalContextBounds (using Context ) extends SyntaxMsg (IllegalContextBoundsID ):
3521- override protected def msg (using Context ): String =
3537+ override protected def msg (using Context ): String =
35223538 i " Context bounds are not allowed in this position "
35233539
35243540 override protected def explain (using Context ): String = " "
0 commit comments