[Issue 6655] New: Forward error with static array length

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 12 15:47:28 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6655

           Summary: Forward error with static array length
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic, rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-09-12 15:47:11 PDT ---
D2 code:


enum size_t N = 1;
int[bar.length] foo;
int[N] bar;
void main() {}


DMD 2.055 gives:

Error: cannot create associative array int[N]


This is a very nice bug. There are three problems here: refusing valid code,
thinking bar is an associative array instead of a fixed-sized one, and giving
no line number.

-- 
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