[Issue 21845] New: Wrong ParameterStorageClass when -preview=in is used

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 21 15:09:48 UTC 2021


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

          Issue ID: 21845
           Summary: Wrong ParameterStorageClass when -preview=in is used
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: omerfirmak at gmail.com

When -preview=in causes a parameter to be passed by reference
ParameterStorageClassTuple reports the storage class as ref_ instead of in_.

----------------
import std;
struct Foo
{
        int a;
    double[100] b;
}
void func1 (in Foo foo);
void func2 (const ref Foo foo);
void main()
{
        writeln(ParameterStorageClassTuple!func1);
        writeln(ParameterStorageClassTuple!func2);
}
-------------

--


More information about the Digitalmars-d-bugs mailing list