[Issue 1090] New: Attribute specification: "}" vs "end of scope"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 2 03:43:52 PDT 2007


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

           Summary: Attribute specification: "}" vs "end of scope"
           Product: D
           Version: 1.010
          Platform: PC
               URL: http://www.digitalmars.com/d/attribute.html
        OS/Version: All
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: fvbommel at wxs.nl


In the first example block of the "Attributes" page of the spec, the
"attribute:" syntax is noted as "affects all declarations until the next }".
This is incorrect, since the innermost braces may be of the non-scoping
variety. For instance:
---
// These extern(X) attributes are applied until the end of the file
version(Windows) {
    extern(Windows):
} else {
    extern(C):
}
---
Also, there may not be any enclosing braces at all if it's at module-level.

I think that text should be changed to something like "affects all declarations
until the end of the current scope".


-- 



More information about the Digitalmars-d-bugs mailing list