www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18130] New: ICE on zero-length `out` array parameter

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

          Issue ID: 18130
           Summary: ICE on zero-length `out` array parameter
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: johanengelen weka.io

Testcase code:
```
void foo(out byte[0] v)
{
}
```

Testcase cmdline:
`dmd -c dsymbolsem_assert.d`

This asserts in dsymbolsem.d:
https://github.com/dlang/dmd/blob/67ccf216a20e5b45b0fd4136a750b07ded4c8461/src/dmd/dsymbolsem.d#L1427

If anything, this needs better diagnostics (easy to implement a printout of the
function and param for which the error happens).

--
Dec 27 2017