struct S { const(char)[] val; alias val this; } inout(char)[] foo(inout(char)[] s) { return s; } void main() { S s; static assert(is(typeof(foo(s)) == const(char)[])); // Assertion failure: 'targ' on line 2029 in file 'mtype.c' }
https://github.com/D-Programming-Language/dmd/pull/481
https://github.com/D-Programming-Language/dmd/commit/3448ffd1b407453aba647da5f0435f648cfbe04f