D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3515 - Disallow use of comma operator when declaring array dimension
Summary: Disallow use of comma operator when declaring array dimension
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All Linux
: P2 trivial
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-16 13:39 UTC by Justin Johansson
Modified: 2014-04-18 09:12 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 Justin Johansson 2009-11-16 13:39:24 UTC
Declaring an array using the comma operator can be mistaken for
declaring a multi-dimensional array as such form is common in
other languages.

  int[3,4,5] xyz;
  writefln( "xyz.length=%d", xyz.length);


Prints
  xyz.length = 5

Whilst a trivial issue,one would hope that this does not make it into D2.
Comment 1 Don 2010-01-10 11:37:17 UTC
Fixed DMD2.037.