scala/scala — pull request #3357 by retronym (2014-01-12 17:30:10+00:00)
Title: SI-8143 Detect when overriding method weakens access to private

This regressed in e609f1f20b, which excluded all private methods from
overriding checks. We should only exclude private[this] methods, as
was done before that commit.

Why? We need to report an error when if a private method in a subclass
has matches a less-private method in the super class and report an
error, lest the user be fooled into thinking it might be invoked
virtually.

I've removed the test case added by that commit. I tried to reorganize
it in the manner described by Paul in the JIRA ticket, but that still
falls afoul of a legitimate overriding error.

Review by @paulp. Did I misundstand your comment about that test?

This PR just fixed the regression and doesn't address the missing
override error when the overriding methid is qualified private.