D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3689 - Grammar does not allow const(int)
Summary: Grammar does not allow const(int)
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: Other All
: P2 normal
Assignee: No Owner
URL: http://digitalmars.com/d/2.0/declarat...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-07 21:42 UTC by Jerry Quinn
Modified: 2015-06-09 01:27 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jerry Quinn 2010-01-07 21:42:09 UTC
Dmd allows declaring something like

const(int) a = 3;

However, the grammar cannot parse this as written.

Declaration
Decl
StorageClasses Decl
const Decl
FAILURE

The () can't be parsed.

http://digitalmars.com/d/2.0/arrays.html#strings is the first example of this syntax in the docs with immutable(char)[].
Comment 1 Walter Bright 2010-02-12 22:57:13 UTC
changeset 1423
Comment 2 Walter Bright 2010-03-08 22:27:05 UTC
Fixed dmd 2.041