On Mon, May 4, 2009 at 10:08 AM, Rickard Öberg <[email protected]> wrote: > Hey, > > I have run into a problem with the type resolution algorithm that says that > if I request a Composite (Entity/Value/Composite) given a type, then if two > are found to be matching, then throw an exception. I think this needs to be > modified so that if the type being asked for extends Composite then an exact > match should be made. > > Example: > interface Some > {} > > interface SomeValue > extends Some,ValueComposite > {} > > interface AnotherSomeValue > extends SomeValue > {} > > Given the above I want this as result of resolution: > Some -> Ambiguous exception > SomeValue -> SomeValue > AnotherSomeValue -> AnotherSomeValue > > Right now I get ambiguous when I ask for SomeValue, as there are two types > that satisfy it. But since I am asking for a specific one, that one should > be returned. Only if I ask for a mixin type should there be any ambiguity, > OR if SomeValue had indeed been registered twice. > > Does that sound ok?
Agree. In fact, I thought this was already how it worked.... Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

