@@ -2099,7 +2099,7 @@ object messages {
20992099 |This mechanism is used for instance in pattern ${hl(" case List(x1, ..., xn)" )}""" .stripMargin
21002100 }
21012101
2102- class MemberWithSameNameAsStatic ()(implicit val ctx : Context )
2102+ class MemberWithSameNameAsStatic ()(using ctx : Context )
21032103 extends SyntaxMsg (MemberWithSameNameAsStaticID ) {
21042104 def msg = em " Companion classes cannot define members with same name as a ${hl(" @static" )} member "
21052105 def explain = " "
@@ -2114,25 +2114,25 @@ object messages {
21142114 |It can be removed without changing the semantics of the program. This may indicate an error. """ .stripMargin
21152115 }
21162116
2117- class TraitCompanionWithMutableStatic ()(implicit val ctx : Context )
2117+ class TraitCompanionWithMutableStatic ()(using ctx : Context )
21182118 extends SyntaxMsg (TraitCompanionWithMutableStaticID ) {
21192119 def msg = em " Companion of traits cannot define mutable @static fields "
21202120 def explain = " "
21212121 }
21222122
2123- class LazyStaticField ()(implicit val ctx : Context )
2123+ class LazyStaticField ()(using ctx : Context )
21242124 extends SyntaxMsg (LazyStaticFieldID ) {
21252125 def msg = em " Lazy @static fields are not supported "
21262126 def explain = " "
21272127 }
21282128
2129- class StaticOverridingNonStaticMembers ()(implicit val ctx : Context )
2129+ class StaticOverridingNonStaticMembers ()(using ctx : Context )
21302130 extends SyntaxMsg (StaticOverridingNonStaticMembersID ) {
21312131 def msg = em " ${hl(" @static" )} members cannot override or implement non-static ones "
21322132 def explain = " "
21332133 }
21342134
2135- class OverloadInRefinement (rsym : Symbol )(implicit val ctx : Context )
2135+ class OverloadInRefinement (rsym : Symbol )(using ctx : Context )
21362136 extends DeclarationMsg (OverloadInRefinementID ) {
21372137 def msg = " Refinements cannot introduce overloaded definitions"
21382138 def explain =
@@ -2141,14 +2141,14 @@ object messages {
21412141 }
21422142
21432143 class NoMatchingOverload (val alternatives : List [SingleDenotation ], pt : Type )(
2144- err : Errors )(implicit val ctx : Context )
2144+ err : Errors )(using ctx : Context )
21452145 extends TypeMismatchMsg (NoMatchingOverloadID ) {
21462146 def msg =
21472147 em """ None of the ${err.overloadedAltsStr(alternatives)}
21482148 |match ${err.expectedTypeStr(pt)}"""
21492149 def explain = " "
21502150 }
2151- class StableIdentPattern (tree : untpd.Tree , pt : Type )(implicit val ctx : Context )
2151+ class StableIdentPattern (tree : untpd.Tree , pt : Type )(using ctx : Context )
21522152 extends TypeMsg (StableIdentPatternID ) {
21532153 def msg =
21542154 em """ Stable identifier required, but $tree found """
@@ -2157,7 +2157,7 @@ object messages {
21572157
21582158 class IllegalSuperAccessor (base : Symbol , memberName : Name ,
21592159 acc : Symbol , accTp : Type ,
2160- other : Symbol , otherTp : Type )(implicit val ctx : Context ) extends DeclarationMsg (IllegalSuperAccessorID ) {
2160+ other : Symbol , otherTp : Type )(using ctx : Context ) extends DeclarationMsg (IllegalSuperAccessorID ) {
21612161 def msg = {
21622162 // The mixin containing a super-call that requires a super-accessor
21632163 val accMixin = acc.owner
@@ -2210,7 +2210,7 @@ object messages {
22102210 def explain = " "
22112211 }
22122212
2213- class TraitParameterUsedAsParentPrefix (cls : Symbol )(implicit val ctx : Context )
2213+ class TraitParameterUsedAsParentPrefix (cls : Symbol )(using ctx : Context )
22142214 extends DeclarationMsg (TraitParameterUsedAsParentPrefixID ) {
22152215 def msg =
22162216 s " ${cls.show} cannot extend from a parent that is derived via its own parameters "
@@ -2225,7 +2225,7 @@ object messages {
22252225 | """ .stripMargin
22262226 }
22272227
2228- class UnknownNamedEnclosingClassOrObject (name : TypeName )(implicit val ctx : Context )
2228+ class UnknownNamedEnclosingClassOrObject (name : TypeName )(using ctx : Context )
22292229 extends ReferenceMsg (UnknownNamedEnclosingClassOrObjectID ) {
22302230 def msg =
22312231 em """ no enclosing class or object is named ' ${hl(name.show)}' """
@@ -2238,13 +2238,13 @@ object messages {
22382238 """ .stripMargin
22392239 }
22402240
2241- class IllegalCyclicTypeReference (sym : Symbol , where : String , lastChecked : Type )(implicit val ctx : Context )
2241+ class IllegalCyclicTypeReference (sym : Symbol , where : String , lastChecked : Type )(using ctx : Context )
22422242 extends CyclicMsg (IllegalCyclicTypeReferenceID ) {
22432243 def msg = i " illegal cyclic type reference: ${where} ${hl(lastChecked.show)} of $sym refers back to the type itself "
22442244 def explain = " "
22452245 }
22462246
2247- class ErasedTypesCanOnlyBeFunctionTypes ()(implicit val ctx : Context )
2247+ class ErasedTypesCanOnlyBeFunctionTypes ()(using ctx : Context )
22482248 extends SyntaxMsg (ErasedTypesCanOnlyBeFunctionTypesID ) {
22492249 def msg = " Types with erased keyword can only be function types `(erased ...) => ...`"
22502250 def explain = " "
0 commit comments