On Wed, Mar 21, 2012 at 8:31 AM, Charles Oliver Nutter
<head...@headius.com> wrote:
> That brought up yet another issue...if the implementation of the
> method comes *above* the interface, like in the following example, we
> will assume the ancestor class's Ruby method is going to get picked
> up. Because we have the interface module in the hierarchy, that's not
> the case, so we need to ensure we bind the method below the interface
> if that's the nearest signature.

Next wrinkle...if you have an interface included twice, and a
superclass implements it, we won't see that impl. So, given:

public interface Int1 {
  public void foo();
}
public interface Int2 extends Int1 {
  public void bar();
}

Ruby:

class ImplemntsInt1
  include Int1
  def foo; end
end

class ImplementsInt2 < ImplementsInt1
  include Int2
  def bar; end
end

The inheritance chain right now ends up looking like

[ImplementsInt2, Int2, Int1, ImplementsInt1, Int1, ...]

because we add all interfaces for a given class to its ancestor list.

This could just be structurally wrong, but I don't have a solution yet.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to