www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7037] New: TemplateTypeParameterSpecialization works differently from IsExpression regarding alias this

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

           Summary: TemplateTypeParameterSpecialization works differently
                    from IsExpression regarding alias this
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: simen.kjaras gmail.com



PST ---
struct Foo {}
struct Bar {
    Foo f;
    alias f this;
}
void works( T )( T value ) if ( is( T : Foo ) ) {}
void doesnotwork( T : Foo )( T value ) {}

void main( ) {
    Bar b;
    works( b );
    doesnotwork( b );
}


The 'works' function runs without problem, 'doesnotwork' does (can you guess?)
not work.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 30 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7037


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch, rejects-valid
           Platform|Other                       |All
         OS/Version|Windows                     |All



https://github.com/D-Programming-Language/dmd/pull/547

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 01 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7037


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



11:07:13 PST ---
https://github.com/D-Programming-Language/dmd/commit/e99bd67fb689d54db837890990efcd6ad03efc57

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 20 2011