Bug 12818 – ConditionalStatement grammar doesn't take into account the : case

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-05-29T01:23:00Z
Last change time
2014-05-29T02:23:47Z
Keywords
spec
Assigned to
nobody
Creator
bugzilla
Blocks
10233

Comments

Comment #0 by bugzilla — 2014-05-29T01:23:11Z
As described on the n.g.: > static if (condition) > else : > > ... declarations ... > > All attributes apply to either: > > 1. the next statement or declaration > 2. { ... } > 3. : ... > > That case is (3), as static if is set up as an attribute. Static if is not an attribute. ConditionalStatement: Condition NoScopeNonEmptyStatement Condition NoScopeNonEmptyStatement else NoScopeNonEmptyStatement Condition: VersionCondition DebugCondition StaticIfCondition Attribute: LinkageAttribute AlignAttribute DeprecatedAttribute ProtectionAttribute Pragma static extern abstract final override synchronized auto scope const immutable inout shared __gshared Property nothrow pure ref
Comment #1 by k.hara.pg — 2014-05-29T02:23:47Z
(In reply to Walter Bright from comment #0) > ConditionalStatement: > Condition NoScopeNonEmptyStatement > Condition NoScopeNonEmptyStatement else NoScopeNonEmptyStatement This is an issue in the definition of ConditionalDeclaration. And this is a dup of issue 12740. *** This issue has been marked as a duplicate of issue 12740 ***