1090 – Attribute specification: "}" vs "end of scope"

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1090 - Attribute specification: "}" vs "end of scope"
Summary: Attribute specification: "}" vs "end of scope"
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 normal
Assignee: Walter Bright
URL: http://www.digitalmars.com/d/attribut...
Keywords: spec
Depends on:
Blocks:
Reported: 2007年04月02日 05:43 UTC by Frits van Bommel
Modified: 2014年02月16日 15:22 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Frits van Bommel 2007年04月02日 05:43:46 UTC
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".
Comment 1 Walter Bright 2007年04月20日 13:17:53 UTC
Fixed DMD 1.013


AltStyle によって変換されたページ (->オリジナル) /