[Issue 3552] ICE(mtype.c): declaring a variable called 'AssociativeArray' then using an AA.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 29 00:58:19 PST 2009


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #4 from Don <clugdbug at yahoo.com.au> 2009-12-29 00:58:15 PST ---
PATCH: Instead of trying to instantiate AssociativeArray, do .AssociativeArray
instead.


Index: mtype.c
===================================================================
--- mtype.c    (revision 317)
+++ mtype.c    (working copy)
@@ -3854,13 +3854,14 @@
          * But the instantiation can fail if it is a template specialization
field
          * which has Tident's instead of real types.
          */
-        TemplateInstance *ti = new TemplateInstance(loc,
Id::AssociativeArray);
+
         Objects *tiargs = new Objects();
         tiargs->push(index);
         tiargs->push(next);
-        ti->tiargs = tiargs;
+        DotTemplateInstanceExp *dti = new DotTemplateInstanceExp(loc, new
IdentifierExp(loc, Id::empty), Id::AssociativeArray, tiargs);

-        ti->semantic(sc);
+        dti->semantic(sc);
+        TemplateInstance *ti = dti->ti;
         ti->semantic2(sc);
         ti->semantic3(sc);
         impl = ti->toAlias()->isStructDeclaration();

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