scala/scala — pull request #2730 by xeno-by (2013-07-14 00:58:46+00:00)
Title: SI-7657 clarifies the "macro overrides method" rule

Currently we allow macros to override non-abstract methods (in order
to provide performance enhancements such as foreach for collections),
and we also disallow macros to override abstract methods (otherwise
downcasting might lead to AbstractMethodErrors).

This patch fixes an oversight in the disallowing rule that prohibited
macros from overriding a concrete method if that concrete method itself
overrides an abstract method. RefCheck entertains all overriding pairs,
not only the immediate ones, so the disallowing rule was triggered.

Now macros can override abstract methods if and only if either the base
type or the self type contain a matching non-abstract method.