[Issue 3467] New: Non-int integral template parameters not correctly propagated
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 2 02:56:39 PST 2009
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: nobody at puremagic.com
ReportedBy: simen.kjaras at gmail.com
--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list