http://d.puremagic.com/issues/show_bug.cgi?id=3467
Summary: Non-int integral template parameters not correctly
propagated
Product: D
Version: 2.035
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Simen Kjaeraas <[email protected]> 2009-11-02 02:56:38
PST ---
The below code snippet fails to compile on DMD 2.035:
Error: cannot implicitly convert expression (baz.barof type foo!(n) to foo!(4)
Now change uint to int, and everything works perfectly. This might have to do
with literal types ( 4 is an int, not a uint, ulong, byte, or whatever ).
struct foo( uint n ) {
foo!( n ) bar( ) {
typeof( return ) result;
return result;
}
}
void main( ) {
foo!( 4 ) baz;
baz = baz.bar;// FAIL
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------