[Issue 21918] New: segfault in getParameterStorageClasses on auto function with error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 13 10:36:06 UTC 2021


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

          Issue ID: 21918
           Summary: segfault in getParameterStorageClasses on auto
                    function with error
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice, ice-on-invalid-code
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dkorpel at live.nl

I was testing out whether you can use getParameterStorageClasses to find out
whether the compiler inferred `scope` on parameters. The answer seems to be no,
and as a bonus, I stumbled on this:

```
auto yip(int f) {return T[];}
pragma(msg, __traits(getParameterStorageClasses, yip, 0));
```

Output:
test.d(1): Error: undefined identifier `T`
[1]    9590 segmentation fault  dmd -o- test.d

--


More information about the Digitalmars-d-bugs mailing list