[Issue 12352] New: Consistently stop encoding return type of parent functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 12 07:39:48 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12352
Summary: Consistently stop encoding return type of parent
functions
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2014-03-12 07:39:44 PDT ---
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.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list