www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11499] New: is-expression misbehaving with 'alias this'

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11499

           Summary: is-expression misbehaving with 'alias this'
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: tommitissari hotmail.com


--- Comment #0 from Tommi <tommitissari hotmail.com> 2013-11-11 13:51:54 PST ---
This affects at least std.traits.isInstanceOf.

struct A(T)
{}

struct B
{
    A!int _a;
    alias _a this;
}

void main()
{
    static assert(!is(B == A!int)); // OK
    static assert(!is(B == A!X, X)); // assertion fails
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 11 2013
parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11499


Tommi <tommitissari hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 05 2013