Summary: Compile time assertion error with associative arrays
                    of class types
           Product: D
           Version: 2.036
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Justin Greenwood <> 2009-11-25 
07:35:36 PST ---
Created an attachment (id=518)
The simple example that shows the error.

I have attached two files, both simple code illustrating the error I've run
into. In the testAssociativeArrayFails.d file, there is a foreach block that
iterates through an associative array. If that foreach block is removed, the
file compiles fine. The error is not really meaningful and I imagine the
assertion errors in the compiler should not happen.

To help show what is causing the bug, I wrote the same sample class without
using a Variant internally in my class and everything works fantastically. I
put a shitload of time trying to figure out the error in a much more
complicated program - this error just started when I upgraded to the newest
version of DMD 2.x. I hope you can make use of my example code.

When I run the attached files, this is the output:
tiveArrayFails.d" -of.\bin\testAssociativeArrayFails.exe
.\src\testAssociativeArrayFails.d(14): Error: template instance
 is not a template declaration, it is a overloadset
Assertion failure: 'impl' on line 3351 in file 'mtype.c'

abnormal program termination

'.\bin\testAssociativeArrayFails.exe' is not recognized as an internal or
al command,
operable program or batch file.

tiveArrayWorks.d" -of.\bin\testAssociativeArrayWorks.exe

** Associative Array using Classes without variants **
true = 12.32
12 = 14

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to