[Issue 7037] New: TemplateTypeParameterSpecialization works differently from IsExpression regarding alias this
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 30 03:16:06 PST 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 at puremagic.com
ReportedBy: simen.kjaras at gmail.com
--- Comment #0 from Simen Kjaeraas <simen.kjaras at 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: -------
More information about the Digitalmars-d-bugs
mailing list