[Issue 8749] Wrong mangling of in parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 4 07:42:08 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8749
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2012-10-04 07:36:17 PDT ---
This is difficult issue. Because, with current dmd, scope parameter does
affects only for delegate types. For other types, it has no meaning.
Furthermore, the equality 'in' == 'const scope' is almost a lie.
In semantic phase, 'in' storage class is directly translated to 'const' storage
class, then affects to the parameter type. There is no appearance of 'scope'.
void foo(const scope void delegate() dg){}
void bar( in void delegate() dg){}
pragma(msg, typeof(foo)); // void(scope const(void delegate()) dg)
pragma(msg, typeof(bar)); // void(const(void delegate()) dg)
Therefore, it seems to me that the mangling difference is just for backward
compatibility. It is almost redundant, but does not existing code...
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list