Bug 6866 – ICE(mtype.c): alias this and inout matching

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-10-30T07:00:00Z
Last change time
2011-10-31T12:11:42Z
Keywords
ice-on-valid-code, patch
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2011-10-30T07:00:44Z
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' }
Comment #1 by k.hara.pg — 2011-10-30T07:53:23Z
Comment #2 by bugzilla — 2011-10-31T12:11:42Z