[Issue 6571] typedefs ignore const, shared, immutable etc modifiers when implicitly converting

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 29 09:38:21 PDT 2011


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


Iain Buclaw <ibuclaw at ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at ubuntu.com


--- Comment #1 from Iain Buclaw <ibuclaw at ubuntu.com> 2011-08-29 09:38:19 PDT ---
I think this should sort it:


 MATCH TypeTypedef::constConv(Type *to)
 {
     if (equals(to))
         return MATCHexact;
-    if (ty == to->ty && sym == ((TypeTypedef *)to)->sym)
-        return sym->basetype->implicitConvTo(((TypeTypedef
*)to)->sym->basetype);
+    if (ty == to->ty && sym == ((TypeTypedef *)to)->sym &&
+        MODimplicitConv(mod, to->mod))
+        return MATCHconst;
     return MATCHnomatch;
 }



Regards

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