@@ -213,30 +213,28 @@ abstract class RefChecks extends Transform {
213
213
else isCompetitive(syms, sawNlly, sawNonNlly)
214
214
case _ => false
215
215
})
216
- for ((_, syms) <- byName if syms.lengthCompare(1 ) > 0 && isCompetitive(syms, sawNlly= false , sawNonNlly= false )) {
217
- val (nullaries, alts) = syms.partition(sym => isNullary(sym.info))
218
- // assert(!alts.isEmpty)
219
- nullaries match {
220
- case nullary :: Nil =>
221
- if (warnable(syms))
222
- warnDubious(nullary, alts)
223
- case nullaries =>
224
- // assert(!nullaries.isEmpty)
225
- val dealiased =
226
- nullaries.find(_.isPrivateLocal) match {
227
- case Some (local) =>
228
- nullaries.find(sym => sym.isAccessor && sym.accessed == local) match {
229
- case Some (accessor) => nullaries.filter(_ != local) // drop local if it has an accessor
230
- case _ => nullaries
231
- }
232
- case _ => nullaries
233
- }
234
- // there are multiple exactly for a private local and an inherited member
235
- if (warnable(syms))
216
+ for ((_, syms) <- byName)
217
+ if (syms.lengthCompare(1 ) > 0 && isCompetitive(syms, sawNlly = false , sawNonNlly = false ) && warnable(syms)) {
218
+ val (nullaries, alts) = syms.partition(sym => isNullary(sym.info))
219
+ // assert(!alts.isEmpty)
220
+ nullaries match {
221
+ case nullary :: Nil => warnDubious(nullary, alts)
222
+ case nullaries =>
223
+ // assert(!nullaries.isEmpty)
224
+ val dealiased =
225
+ nullaries.find(_.isPrivateLocal) match {
226
+ case Some (local) =>
227
+ nullaries.find(sym => sym.isAccessor && sym.accessed == local) match {
228
+ case Some (accessor) => nullaries.filter(_ != local) // drop local if it has an accessor
229
+ case _ => nullaries
230
+ }
231
+ case _ => nullaries
232
+ }
233
+ // there are multiple exactly for a private local and an inherited member
236
234
for (nullary <- dealiased)
237
235
warnDubious(nullary, nullary :: alts) // add (other) nullary to list of alts to show as overloads
236
+ }
238
237
}
239
- }
240
238
}
241
239
242
240
// Override checking ------------------------------------------------------------
0 commit comments