[Issue 4786] New: enum of run-time array length
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 1 12:12:03 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4786
Summary: enum of run-time array length
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-09-01 12:11:48 PDT ---
This compiles with no errors with DMD 2.048, but I think it's a bug, because
args.length is a value known only at a run-time, while enum is for values known
at compile-time:
void main(string[] args) {
enum int n = args.length;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list