Commits

Doug Gregor committed 9ccaf820b84
Start making the method overriding rules a bit more sane. When we type check the signature of a method, determine which method it overrides (if any) at that time. This ensures that we always have this information for name lookup (per <rdar://problem/15932845>). As part of this, start to make the overriding rules a little more sane. John has worked out more of the model here, but this patch: - Considers an Objective-C method an override of another Objective-C method if the selectors match and the type vs. instance-ness of the methods match. The method types are checked for consistency (subtyping is okay). - Diagnoses when a method overrides more than one method from a superclass, and - Eliminates the "cannot overload method from a superclass" diagnostic, which is overly pedantic and oddly limiting. Note that we lose some amount of checking here. Specifically, we don't have a good place to check that one has not provided two different methods that override the same superclass method. The older code did that (somewhat), and it's not a trivial problem to solve efficiently. This fixes the part of <rdar://problem/15597226> that is needed for <rdar://problem/15932845>. It still doesn't handle properties, subscripts, and undoubtedly other issues. Swift SVN r13108