Thread overview
[Issue 7037] New: TemplateTypeParameterSpecialization works differently from IsExpression regarding alias this
Nov 30, 2011
Simen Kjaeraas
Dec 01, 2011
Kenji Hara
Dec 20, 2011
Walter Bright
November 30, 2011
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


--- Comment #0 from Simen Kjaeraas <simen.kjaras@gmail.com> 2011-11-30 03:15:03 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: -------
December 01, 2011
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


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-12-01 05:35:20 PST ---
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: -------
December 20, 2011
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


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-12-20 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: -------