www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17663] New: header generation (-H) is broken with public

https://issues.dlang.org/show_bug.cgi?id=17663

          Issue ID: 17663
           Summary: header generation (-H) is broken with public override
                    of private default
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: eyal weka.io

Example breakage:

// test_di_gen.d:
private:
public struct Export {}

dmd -H generates the following di file:

// D import file generated from 'test_di_gen.d'
private public struct Export
{
}

Needless to say "private public" does not compile.

background: I use "private:" in beginning of all my modules/structs to reverse
the default - I want my exports to be explicit and narrow.

--
Jul 18 2017