bug in package-attribute in interfaces
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Wed Jul 18 04:44:58 PDT 2007
Bruno Medeiros wrote:
> Extrawurst wrote:
>> removing package works as expected, but it was exactly the "package"
>> attribute i need in this situation ;-(
>>
>>
>> Jarrett Billingsley schrieb:
>>> "Extrawurst" <spam at extrawurst.org> wrote in message
>>> news:f7i0b0$25d6$1 at digitalmars.com...
>>>
>>>> Gives linker error:
>>>> test\testMe.obj(testMe)
>>>> Error 42: Symbol Undefined _D4test5inter4IFoo3barMFZv
>>>>
>>>> why is this?
>>>>
>>>
>>> Don't quote me on this but I think I heard that 'package' methods are
>>> oddly non-virtual. Try removing the 'package' attribute from the
>>> interface/class methods.
>>>
>>>
>
> It is said that interface methods should all be public, since doing
> otherwise kinda goes against the purpose of an interface (which is to
> expose an inteface :P).
> Try making the interface itself package, instead of the interface's
> methods.
>
>
Hum, I forgot: that's how it *should* work, but D currently doesn't
honor protection attributes for types(classes, interfaces, etc.), only
for variables and functions.
--
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d-learn
mailing list