Thread overview
[Issue 2445] New: D2 std.demangle example doesn't compile
Nov 07, 2008
d-bugmail
Apr 25, 2009
d-bugmail
Jul 30, 2010
Trass3r
Jan 23, 2012
Walter Bright
Dec 02, 2012
Andrej Mitrovic
November 07, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2445

           Summary: D2 std.demangle example doesn't compile
           Product: D
           Version: 2.019
          Platform: PC
               URL: http://www.digitalmars.com/d/2.0/phobos/std_demangle.htm
                    l
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: smjg@iname.com


The example given on the std.demangle page fails to compile with the errors:

demangle.d(19): function std.demangle.demangle (invariant(char)[] name) does
not
 match parameter types (char[])
demangle.d(19): Error: cannot implicitly convert expression (buffer) of type
cha
r[] to invariant(char)[]


-- 

April 25, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2445


smjg@iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dhasenan@gmail.com




------- Comment #1 from smjg@iname.com  2009-04-25 08:14 -------
*** Bug 2896 has been marked as a duplicate of this bug. ***


-- 

July 30, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2445


Trass3r <mrmocool@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
                 CC|                            |mrmocool@gmx.de
           Platform|x86                         |All
         OS/Version|Windows                     |All


--- Comment #2 from Trass3r <mrmocool@gmx.de> 2010-07-29 17:06:31 PDT ---
Also fgetc and writef give errors. Here's a working example (2.047):

import std.stdio;
import std.ctype;
import std.demangle;

int main()
{   string buffer;
    bool inword;
    foreach(c; InputByChar(stdin))
    {
        if (inword)
        {
            if (c == '_' || isalnum(c))
                buffer ~= cast(char) c;
            else
            {
                inword = false;
                write(demangle(buffer), cast(char) c);
            }
        }
        else
        {   if (c == '_' || isalpha(c))
            {        inword = true;
                buffer.length = 0;
                buffer ~= cast(char) c;
            }
            else
                write(cast(char) c);
        }
    }
    if (inword)
        write(demangle(buffer));
    return 0;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2445


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|spec                        |
                 CC|                            |bugzilla@digitalmars.com


--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2012-01-22 16:50:09 PST ---
This doesn't work either; InputByChar is not defined.

Also, not a spec issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2445


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |andrej.mitrovich@gmail.com


--- Comment #4 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-01 17:00:08 PST ---
http://d.puremagic.com/issues/show_bug.cgi?id=2445

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2445



--- Comment #5 from github-bugzilla@puremagic.com 2012-12-02 04:33:19 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/a3d4857858fd096c07be283c28a58ffe4a8b665f Fixes Issue 2445 - std.demangle example won't compile.

https://github.com/D-Programming-Language/phobos/commit/e47718f15d3d9d57439e5b52c8861d201b9c96dd Merge pull request #986 from AndrejMitrovic/Fix2445

Fixes Issue 2445 - std.demangle example won't compile.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2445


Alex Rønne Petersen <alex@lycus.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |alex@lycus.org
         Resolution|                            |FIXED


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