David Chisnall wrote: > On 2 Mar 2010, at 19:54, Truls Becken wrote: > >> Smells like a compiler bug, I guess. David? > > Clang uses the ObjC 2 rules for protocols; they should either be empty > (forward-declared), in which case they will be resolved at load time, or > their definitions should match. This is to prevent two modules from > declaring different protocols of the same name and breaking after testing for > protocol conformance. > > You should not ever adopt a protocol that is only forward-declared. This > will break introspection with the old ABI and cause all sorts of irritating > problems. With the new runtime, if you adopt a forward-declared protocol > then the runtime will try to fix up its definition to match the real > definition one, if it can.
So this means that old-style declarations: @protocol UKTest; should be changed to empty definitions: @protocol UKTest @end and not to imports, which create unnecessary work for the compiler: #import <UnitKit/UKTest.h> Correct? -Truls _______________________________________________ Etoile-dev mailing list Etoile-dev@gna.org https://mail.gna.org/listinfo/etoile-dev