[Issue 17544] New: Versions derived from predefined versions not reserved
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Sat Jun 24 05:05:05 PDT 2017
    
    
  
https://issues.dlang.org/show_bug.cgi?id=17544
          Issue ID: 17544
           Summary: Versions derived from predefined versions not reserved
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org
The documentations says (emphasis on the last sentence):
---
It is inevitable that the D language will evolve over time. Therefore, the
version identifier namespace beginning with "D_" is reserved for identifiers
indicating D language specification or new feature conformance. Further, all
identifiers derived from the ones listed above by appending any character(s)
are reserved.
This means that e.g. ARM_foo and Windows_bar are reserved while foo_ARM and
bar_Windows are not.
---
However, this code compiles, which seems contrary to the spec.
---
version = ARM_foo;
version = Windows_bar;
version (ARM_foo)
{
  void foo()
  {
  }
}
version (Windows_bar)
{
  void bar()
  {
  }
}
---
--
    
    
More information about the Digitalmars-d-bugs
mailing list