[Issue 24663] New: dip1000 doesn't check slice expression implicitly converted to static array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 15 13:21:18 UTC 2024


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

          Issue ID: 24663
           Summary: dip1000 doesn't check slice expression implicitly
                    converted to static array
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: safe
          Severity: normal
          Priority: P3
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dkorpel at live.nl

These should error with dip1000 for returning a `scope int*`:

```
    int*[3] escape8b(scope int*[3] p) @safe { return p[]; }
ref int*[3] escape9b(scope int*[3] p) @safe { return p[]; }
```

But they currently compile without error.

--


More information about the Digitalmars-d-bugs mailing list