www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6572] New: Deprecate typedef

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

           Summary: Deprecate typedef
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: yebblies gmail.com



typedef needs to issue a deprecation error when used in D2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 29 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6572


yebblies <yebblies gmail.com> changed:

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



https://github.com/D-Programming-Language/dmd/pull/354
https://github.com/D-Programming-Language/druntime/pull/63
https://github.com/D-Programming-Language/phobos/pull/224

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 29 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6572


Trass3r <mrmocool gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrmocool gmx.de



Shouldn't we provide a complete library based typedef first?
http://d.puremagic.com/issues/show_bug.cgi?id=5467

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 29 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6572


Iain Buclaw <ibuclaw ubuntu.com> changed:

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



*sadface*

I think it is better to catch this in the parser stage, rather than semantic.


--- Dsymbols *Parser::parseDeclarations ---
             if (tok == TOKtypedef)
+            {
+                if (!global.params.useDeprecated)
+                    error("typedef is deprecated, use alias");
                 v = new TypedefDeclaration(loc, ident, t, init);
+            }


Regards
Iain

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 29 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6572





 Shouldn't we provide a complete library based typedef first?
 http://d.puremagic.com/issues/show_bug.cgi?id=5467
Maybe, probably.
 *sadface*
 
 I think it is better to catch this in the parser stage, rather than semantic.
 
 
 --- Dsymbols *Parser::parseDeclarations ---
              if (tok == TOKtypedef)
 +            {
 +                if (!global.params.useDeprecated)
 +                    error("typedef is deprecated, use alias");
                  v = new TypedefDeclaration(loc, ident, t, init);
 +            }
 
 
 Regards
 Iain
Wouldn't this prevent using typedef even inside version(none) etc blocks? Is that something we want? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 29 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6572


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



20:21:01 PST ---
https://github.com/D-Programming-Language/dmd/commit/a22fd423f3896dd17d59e39cdb809ba7721faad2

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 19 2011