← Back to index
|
Original Bugzilla link
Bug 21747 – core.demangle does not understand function-local mangling
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2021-03-22T08:02:51Z
Last change time
2022-02-10T03:05:55Z
Assigned to
No Owner
Creator
Mathias LANG
See also
https://issues.dlang.org/show_bug.cgi?id=14831
Comments
Comment #0
by pro.mathias.lang — 2021-03-22T08:02:51Z
Since the fix for issue 14831, the following code outputs the same value for mangled and demangled names: ``` import core.demangle; import std.meta; import std.stdio; void main () { foreach (idx, T; AliasSeq!(int, char, bool, int, string, int, ubyte)) { void checkValue (TT) (TT value, size_t id) { assert(id == idx); assert(value == TT.init); } checkValue(T.init, idx); writeln(" Mangled named: ", checkValue!T.mangleof); writeln("Demangled named: ", checkValue!T.mangleof.demangle); } } ``` ``` Mangled named: _D3foo4mainFZ__T10checkValueTiZQpMFNaNbNiNfimZv Demangled named: pure nothrow @nogc @safe void foo.main().checkValue!(int).checkValue(int, ulong) Mangled named: _D3foo4mainFZ__T10checkValueTaZ5__S1QuMFNaNbNiNfamZv Demangled named: _D3foo4mainFZ__T10checkValueTaZ5__S1QuMFNaNbNiNfamZv Mangled named: _D3foo4mainFZ__T10checkValueTbZ5__S2QuMFNaNbNiNfbmZv Demangled named: _D3foo4mainFZ__T10checkValueTbZ5__S2QuMFNaNbNiNfbmZv Mangled named: _D3foo4mainFZ__T10checkValueTiZ5__S3QuMFNaNbNiNfimZv Demangled named: _D3foo4mainFZ__T10checkValueTiZ5__S3QuMFNaNbNiNfimZv Mangled named: _D3foo4mainFZ__T10checkValueTAyaZ5__S4QwMFNaNbNiNfQvmZv Demangled named: _D3foo4mainFZ__T10checkValueTAyaZ5__S4QwMFNaNbNiNfQvmZv Mangled named: _D3foo4mainFZ__T10checkValueTiZ5__S5QuMFNaNbNiNfimZv Demangled named: _D3foo4mainFZ__T10checkValueTiZ5__S5QuMFNaNbNiNfimZv Mangled named: _D3foo4mainFZ__T10checkValueThZ5__S6QuMFNaNbNiNfhmZv Demangled named: _D3foo4mainFZ__T10checkValueThZ5__S6QuMFNaNbNiNfhmZv ```
Comment #1
by pro.mathias.lang — 2022-02-10T03:05:55Z
This was fixed in v2.096.1.