Bug 7037 – TemplateTypeParameterSpecialization works differently from IsExpression regarding alias this
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-11-30T03:15:00Z
Last change time
2011-12-20T11:07:13Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
simen.kjaras
Comments
Comment #0 by simen.kjaras — 2011-11-30T03:15:03Z
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.