www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2825] New: Guideline for semianonymous structs and unions

http://d.puremagic.com/issues/show_bug.cgi?id=2825

           Summary: Guideline for semianonymous structs and unions
           Product: D
           Version: 2.027
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P3
         Component: www.digitalmars.com
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: maxmo pochta.ru


the following doesn't translate straightforwardly to D
----
union Info
{
  struct
  {
    char *Name;
  } File;
};
----
Ona can write
----
union Info
{
  struct File
  {
    char *Name;
  }
}
----
But it's not the same. I think, the case should be considered in docs, and a
translation guideline should be added.


-- 
Apr 09 2009