Bug 12352 – Consistently stop encoding return type of parent functions

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-12T07:39:00Z
Last change time
2014-03-28T20:39:21Z
Keywords
pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2014-03-12T07:39:44Z
Currently, for a function local symbol, the return types of its parent functions are normally mangled into the name. module test; int foo() { void bar() { struct S {} pragma(msg, S.mangleof); // S 4test 3fooFZi 3barMFZv 1S // | | // int of foo | // void of bar } return 0; } But, for Voldemort types, we already has an exception of the rule. module test; auto foo() { auto bar() { struct S {} pragma(msg, S.mangleof); // S 4test 3fooFZ 3barMFZ 1S // | | // no return type for foo | // no return type for bar return S(); } return 0; } The change was introduced to fix Issue 8847. Essentially encoding the return types is redundant, because D does not allow function overloading based on the return types.
Comment #1 by k.hara.pg — 2014-03-12T08:04:59Z
Comment #2 by github-bugzilla — 2014-03-13T15:01:42Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b674baca1a45e43d37ca879a9df9f00ff66199a3 fix Issue 12352 - Consistently stop encoding return type of parent functions Remove hack for Voldemort Type mangling https://github.com/D-Programming-Language/dmd/commit/b6fe187c0fbb91ff71b11892391769dc74489465 Merge pull request #3377 from 9rnsr/fix12352 Issue 12352 - Consistently stop encoding return type of parent functions
Comment #3 by k.hara.pg — 2014-03-28T20:39:21Z
*** Issue 4268 has been marked as a duplicate of this issue. ***