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

          Issue ID: 23098
           Summary: array literal to scope inout parameter not allowed in
                    safe code
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

```
@safe:
void f(scope inout(int)[] d) {}

void main()
{
    f([10, 20]);
}
```

```
Up to      2.091.1: Success and no output
Since      2.092.1: Failure with output:
Error: cast from `int[2]` to `inout(int)[]` not allowed in safe code
```

Introduced by https://github.com/dlang/dmd/pull/11039
Uncovered by: https://github.com/dlang/dmd/pull/14067

--

Reply via email to