www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23169] New: [DIP1000] Mangling does not distinguish return


          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 puremagic.com
          Reporter: Ajieskola 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;

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.

Jun 07 2022