[Issue 2995] Incorrect conversion in c ? a : b

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 4 08:22:48 PDT 2010


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


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

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


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-04-04 08:22:46 PDT ---
PATCH: cast.c, line 1663. Conversion of both types to const needs to occur for
classes, as well as for arrays and pointers.

    else if (t1->ty == Tclass || t2->ty == Tclass)
    {
+        if (t1->mod != t2->mod)
+        {
+            t1 = t1->mutableOf()->constOf();
+            t2 = t2->mutableOf()->constOf();
+            t = t1;
+            goto Lagain;
+        }
        while (1)
        {
            int i1 = e2->implicitConvTo(t1);
            int i2 = e1->implicitConvTo(t2);

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