[Issue 3692] New: Compiler with associative arrays when std.variant is imported

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 8 12:35:27 PST 2010


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

           Summary: Compiler with associative arrays when std.variant is
                    imported
           Product: D
           Version: 2.038
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: lmb at stackedboxes.org


--- Comment #0 from Leandro Motta Barros <lmb at stackedboxes.org> 2010-01-08 12:35:25 PST ---
First, I am using DMD 2.039, for which there is no entry on the "Version"
field. Anyway, I firstly bumped into this when using DMD 2.037.

So, when compiling this code:

import std.variant;

void main()
{
   bool[int] a;
   auto x = a.keys[0];
}

The compiler crashes saying:

        deferring sigaction_t
dmd: mtype.c:3882: StructDeclaration* TypeAArray::getImpl(): Assertion `impl'
failed.

---

Removing the 'import std.variant;' statement solves the problem.

Replacing the 'bool[int]' with 'int[int]' (and still importing std.variant)
makes the compiler say:

        deferring sigaction_t

But it still generates the executable, which seems to work as expected (that
is, throwing a "Range Violation").

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