@@ -1027,7 +1027,7 @@ class Namer { typer: Typer =>
1027
1027
class ClassCompleter (cls : ClassSymbol , original : TypeDef )(ictx : Context ) extends Completer (original)(ictx) {
1028
1028
withDecls(newScope)
1029
1029
1030
- protected implicit val ctx : Context = localContext(cls)
1030
+ protected implicit val completerCtx : Context = localContext(cls)
1031
1031
1032
1032
private var localCtx : Context = _
1033
1033
@@ -1179,23 +1179,23 @@ class Namer { typer: Typer =>
1179
1179
val moduleType = cls.owner.thisType select sourceModule
1180
1180
if (self.name == nme.WILDCARD ) moduleType
1181
1181
else recordSym(
1182
- ctx .newSymbol(cls, self.name, self.mods.flags, moduleType, coord = self.span),
1182
+ completerCtx .newSymbol(cls, self.name, self.mods.flags, moduleType, coord = self.span),
1183
1183
self)
1184
1184
}
1185
1185
else createSymbol(self)
1186
1186
1187
1187
val savedInfo = denot.infoOrCompleter
1188
1188
denot.info = new TempClassInfo (cls.owner.thisType, cls, decls, selfInfo)
1189
1189
1190
- localCtx = ctx .inClassContext(selfInfo)
1190
+ localCtx = completerCtx .inClassContext(selfInfo)
1191
1191
1192
1192
index(constr)
1193
1193
index(rest)(localCtx)
1194
1194
1195
1195
symbolOfTree(constr).info.stripPoly match // Completes constr symbol as a side effect
1196
1196
case mt : MethodType if cls.is(Case ) && mt.isParamDependent =>
1197
1197
// See issue #8073 for background
1198
- ctx .error(
1198
+ completerCtx .error(
1199
1199
i """ Implementation restriction: case classes cannot have dependencies between parameters """ ,
1200
1200
cls.sourcePos)
1201
1201
case _ =>
@@ -1241,28 +1241,28 @@ class Namer { typer: Typer =>
1241
1241
* (4) If the class is sealed, it is defined in the same compilation unit as the current class
1242
1242
*/
1243
1243
def checkedParentType (parent : untpd.Tree ): Type = {
1244
- val ptype = parentType(parent)(ctx .superCallContext).dealiasKeepAnnots
1244
+ val ptype = parentType(parent)(completerCtx .superCallContext).dealiasKeepAnnots
1245
1245
if (cls.isRefinementClass) ptype
1246
1246
else {
1247
1247
val pt = checkClassType(ptype, parent.sourcePos,
1248
1248
traitReq = parent ne parents.head, stablePrefixReq = true )
1249
1249
if (pt.derivesFrom(cls)) {
1250
1250
val addendum = parent match {
1251
- case Select (qual : Super , _) if ctx .scala2CompatMode =>
1251
+ case Select (qual : Super , _) if completerCtx .scala2CompatMode =>
1252
1252
" \n (Note that inheriting a class of the same name is no longer allowed)"
1253
1253
case _ => " "
1254
1254
}
1255
- ctx .error(CyclicInheritance (cls, addendum), parent.sourcePos)
1255
+ completerCtx .error(CyclicInheritance (cls, addendum), parent.sourcePos)
1256
1256
defn.ObjectType
1257
1257
}
1258
1258
else {
1259
1259
val pclazz = pt.typeSymbol
1260
1260
if pclazz.is(Final ) then
1261
- ctx .error(ExtendFinalClass (cls, pclazz), cls.sourcePos)
1261
+ completerCtx .error(ExtendFinalClass (cls, pclazz), cls.sourcePos)
1262
1262
else if pclazz.isEffectivelySealed && pclazz.associatedFile != cls.associatedFile then
1263
1263
if pclazz.is(Sealed ) then
1264
- ctx .error(UnableToExtendSealedClass (pclazz), cls.sourcePos)
1265
- else if ctx .settings.strict.value then
1264
+ completerCtx .error(UnableToExtendSealedClass (pclazz), cls.sourcePos)
1265
+ else if completerCtx .settings.strict.value then
1266
1266
checkFeature(nme.adhocExtensions,
1267
1267
i " Unless $pclazz is declared 'open', its extension in a separate file " ,
1268
1268
cls.topLevelClass,
0 commit comments