[Issue 3334] std.demangle doesn't parse ref, pure, nothrow

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 8 18:26:49 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=3334

kennytm at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |kennytm at gmail.com
         Resolution|---                         |FIXED

Andrei Alexandrescu <andrei at erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.032                       |D2

--- Comment #4 from kennytm at gmail.com ---
Looks like this has been fixed.

--------------------------
module x;
import core.demangle, std.traits;

@property ref pure nothrow int foo(ref int z) {
    return z;
}
@safe void bar() {
}
@trusted void baz() {
}

void main() {
    assert(demangle(mangledName!foo) == "pure nothrow ref @property int
x.foo(ref int)");
    assert(demangle(mangledName!bar) == "@safe void x.bar()");
    assert(demangle(mangledName!baz) == "@trusted void x.baz()");
}
--------------------------

--


More information about the Digitalmars-d-bugs mailing list