Bug 23169 – [DIP1000] Mangling does not distinguish return and return scope

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-06-07T15:20:33Z
Last change time
2022-06-22T21:42:48Z
Keywords
pull
Assigned to
No Owner
Creator
Ate Eskola

Comments

Comment #0 by Ajieskola — 2022-06-07T15:20:33Z
Tested with dmd 2.100.0 ------------------ struct Ptr { int* impl; void* fun1() return scope {return impl;} void* fun2() return {return &this;} } void main() { import std.demangle, std.stdio; Ptr.fun1.mangleof.writeln; Ptr.fun2.mangleof.writeln; } ------------------ This outputs two similar mangled names except for the function name. They should be mangled differently since the this reference has a different storage class between the two.
Comment #1 by dlang-bot — 2022-06-21T13:38:40Z
@dkorpel created dlang/dmd pull request #14233 "Fix 23169 - Mangling does not distinguish return and return scope" fixing this issue: - Fix 23169 - Mangling does not distinguish return and return scope https://github.com/dlang/dmd/pull/14233
Comment #2 by dlang-bot — 2022-06-22T21:42:48Z
dlang/dmd pull request #14233 "Fix 23169 - Mangling does not distinguish return and return scope" was merged into master: - 5b0a960ed49363194684a5fc5242daa26c26686e by Dennis Korpel: Fix 23169 - Mangling does not distinguish return and return scope https://github.com/dlang/dmd/pull/14233