www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3982] New: [ICE] a.values on wrong AA

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3982

           Summary: [ICE] a.values on wrong AA
           Product: D
           Version: 2.041
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



This is wrong D2 code:


struct Foo {
    static Foo opCall() {}
}
void main() {
    Foo[Foo] a;
    a.values;
}


Assertion failure: 'impl' on line 3901 in file 'mtype.c'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 17 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3982


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |clugdbug yahoo.com.au



PATCH: 
TypeAArray::getImpl(), mtype.c line 3906.


#endif
+            // If there are global errors, TemplateInstance::semantic() 
+            // will refuse to instantiate the template.
+            // So we need to temporarily set errors to zero.
+            int olderrors = global.errors;
+            global.errors = 0;
            ti->semantic(sc);
            ti->semantic2(sc);
            ti->semantic3(sc);
+            global.errors += olderrors;
            impl = ti->toAlias()->isStructDeclaration();

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 09 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3982


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



Fixed DMD 2.044

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 05 2010