adrdox icon indicating copy to clipboard operation
adrdox copied to clipboard

version(D_Ddoc) end up being in documentation

Open FreeSlave opened this issue 7 years ago • 3 comments

///
module main;

///
interface SomeInterface
{
    void someFunc();
}

///
version(D_Ddoc){
    final class SomeClass : SomeInterface
    {
        void someFunc() {}
    }
}

void main()
{

}

Result:

screenshot from 2018-05-30 15-56-03

You can also see strange positioning of final keyword.

FreeSlave avatar May 30 '18 12:05 FreeSlave

On Wed, May 30, 2018 at 05:56:42AM -0700, Roman Chistokhodov wrote:

screenshot from 2018-05-30 15-56-03

Yeah, it doesn't give version ddoc any special treatment (you will notice any version things show up there).... not sure if I want to change that or not. Actually, I think version(ddoc) should be considered harmful and removed, but I get compatibility with the upstream.

I guess if it is present, it can just favor that maybe.

You can also see strange positioning of final keyword.

oh yeah that's a bug.

adamdruppe avatar May 30 '18 13:05 adamdruppe

Actually, I think version(ddoc) should be considered harmful and removed

What do you suggest users should do when there're two completely different implementations (depending on platform), but with the same interface?

FreeSlave avatar May 30 '18 13:05 FreeSlave

On Wed, May 30, 2018 at 06:10:03AM -0700, Roman Chistokhodov wrote:

What do you suggest users should do when there're two completely different implementations (depending on platform), but with the same interface?

Document it just like anything else then use /// ditto like you would an overload.

adamdruppe avatar May 30 '18 13:05 adamdruppe