@@ -2099,7 +2099,7 @@ object messages {
2099
2099
|This mechanism is used for instance in pattern ${hl(" case List(x1, ..., xn)" )}""" .stripMargin
2100
2100
}
2101
2101
2102
- class MemberWithSameNameAsStatic ()(implicit val ctx : Context )
2102
+ class MemberWithSameNameAsStatic ()(using ctx : Context )
2103
2103
extends SyntaxMsg (MemberWithSameNameAsStaticID ) {
2104
2104
def msg = em " Companion classes cannot define members with same name as a ${hl(" @static" )} member "
2105
2105
def explain = " "
@@ -2114,25 +2114,25 @@ object messages {
2114
2114
|It can be removed without changing the semantics of the program. This may indicate an error. """ .stripMargin
2115
2115
}
2116
2116
2117
- class TraitCompanionWithMutableStatic ()(implicit val ctx : Context )
2117
+ class TraitCompanionWithMutableStatic ()(using ctx : Context )
2118
2118
extends SyntaxMsg (TraitCompanionWithMutableStaticID ) {
2119
2119
def msg = em " Companion of traits cannot define mutable @static fields "
2120
2120
def explain = " "
2121
2121
}
2122
2122
2123
- class LazyStaticField ()(implicit val ctx : Context )
2123
+ class LazyStaticField ()(using ctx : Context )
2124
2124
extends SyntaxMsg (LazyStaticFieldID ) {
2125
2125
def msg = em " Lazy @static fields are not supported "
2126
2126
def explain = " "
2127
2127
}
2128
2128
2129
- class StaticOverridingNonStaticMembers ()(implicit val ctx : Context )
2129
+ class StaticOverridingNonStaticMembers ()(using ctx : Context )
2130
2130
extends SyntaxMsg (StaticOverridingNonStaticMembersID ) {
2131
2131
def msg = em " ${hl(" @static" )} members cannot override or implement non-static ones "
2132
2132
def explain = " "
2133
2133
}
2134
2134
2135
- class OverloadInRefinement (rsym : Symbol )(implicit val ctx : Context )
2135
+ class OverloadInRefinement (rsym : Symbol )(using ctx : Context )
2136
2136
extends DeclarationMsg (OverloadInRefinementID ) {
2137
2137
def msg = " Refinements cannot introduce overloaded definitions"
2138
2138
def explain =
@@ -2141,14 +2141,14 @@ object messages {
2141
2141
}
2142
2142
2143
2143
class NoMatchingOverload (val alternatives : List [SingleDenotation ], pt : Type )(
2144
- err : Errors )(implicit val ctx : Context )
2144
+ err : Errors )(using ctx : Context )
2145
2145
extends TypeMismatchMsg (NoMatchingOverloadID ) {
2146
2146
def msg =
2147
2147
em """ None of the ${err.overloadedAltsStr(alternatives)}
2148
2148
|match ${err.expectedTypeStr(pt)}"""
2149
2149
def explain = " "
2150
2150
}
2151
- class StableIdentPattern (tree : untpd.Tree , pt : Type )(implicit val ctx : Context )
2151
+ class StableIdentPattern (tree : untpd.Tree , pt : Type )(using ctx : Context )
2152
2152
extends TypeMsg (StableIdentPatternID ) {
2153
2153
def msg =
2154
2154
em """ Stable identifier required, but $tree found """
@@ -2157,7 +2157,7 @@ object messages {
2157
2157
2158
2158
class IllegalSuperAccessor (base : Symbol , memberName : Name ,
2159
2159
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 ) {
2161
2161
def msg = {
2162
2162
// The mixin containing a super-call that requires a super-accessor
2163
2163
val accMixin = acc.owner
@@ -2210,7 +2210,7 @@ object messages {
2210
2210
def explain = " "
2211
2211
}
2212
2212
2213
- class TraitParameterUsedAsParentPrefix (cls : Symbol )(implicit val ctx : Context )
2213
+ class TraitParameterUsedAsParentPrefix (cls : Symbol )(using ctx : Context )
2214
2214
extends DeclarationMsg (TraitParameterUsedAsParentPrefixID ) {
2215
2215
def msg =
2216
2216
s " ${cls.show} cannot extend from a parent that is derived via its own parameters "
@@ -2225,7 +2225,7 @@ object messages {
2225
2225
| """ .stripMargin
2226
2226
}
2227
2227
2228
- class UnknownNamedEnclosingClassOrObject (name : TypeName )(implicit val ctx : Context )
2228
+ class UnknownNamedEnclosingClassOrObject (name : TypeName )(using ctx : Context )
2229
2229
extends ReferenceMsg (UnknownNamedEnclosingClassOrObjectID ) {
2230
2230
def msg =
2231
2231
em """ no enclosing class or object is named ' ${hl(name.show)}' """
@@ -2238,13 +2238,13 @@ object messages {
2238
2238
""" .stripMargin
2239
2239
}
2240
2240
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 )
2242
2242
extends CyclicMsg (IllegalCyclicTypeReferenceID ) {
2243
2243
def msg = i " illegal cyclic type reference: ${where} ${hl(lastChecked.show)} of $sym refers back to the type itself "
2244
2244
def explain = " "
2245
2245
}
2246
2246
2247
- class ErasedTypesCanOnlyBeFunctionTypes ()(implicit val ctx : Context )
2247
+ class ErasedTypesCanOnlyBeFunctionTypes ()(using ctx : Context )
2248
2248
extends SyntaxMsg (ErasedTypesCanOnlyBeFunctionTypesID ) {
2249
2249
def msg = " Types with erased keyword can only be function types `(erased ...) => ...`"
2250
2250
def explain = " "
0 commit comments