D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6866 - ICE(mtype.c): alias this and inout matching
Summary: ICE(mtype.c): alias this and inout matching
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code, patch
Depends on:
Blocks:
 
Reported: 2011-10-30 07:00 UTC by Kenji Hara
Modified: 2011-10-31 12:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2011-10-30 07:00:44 UTC
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'
}