[Issue 1814] DMD/GDC does not prevent typedef violations

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 4 22:37:20 PST 2008


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


bugzilla at digitalmars.com changed:

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




------- Comment #2 from bugzilla at digitalmars.com  2008-03-05 00:37 -------
It turns out that disallowing:
    typedef int Foo;
    Foo f;
    f = 3;
is very onerous. It will require inserting casts everywhere a literal is used.
So implicitly converting an integer literal to a typedef is allowed. What is
not allowed is:
    int i = 3;
    f = i;
I'll update the documentation to clarify this.


-- 



More information about the Digitalmars-d-bugs mailing list