[Issue 23169] New: [DIP1000] Mangling does not distinguish return and return scope

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 7 15:20:33 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23169

          Issue ID: 23169
           Summary: [DIP1000] Mangling does not distinguish return and
                    return scope
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: Ajieskola at gmail.com

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.

--


More information about the Digitalmars-d-bugs mailing list