[Issue 2291] New: negative default values for int template arguments -> duplicate symbol
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 19 02:49:41 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2291
Summary: negative default values for int template arguments ->
duplicate symbol
Product: DGCC aka GDC
Version: unspecified
Platform: Macintosh
OS/Version: Mac OS X
Status: NEW
Keywords: link-failure, rejects-valid
Severity: normal
Priority: P2
Component: glue layer
AssignedTo: dvdfrdmn at users.sf.net
ReportedBy: fawzi at gmx.ch
something like this:
{{{
class A(int startAxis1=-1){
this() {}
}
void main(){
A!() aa=new A!()();
}
}}}
give an error like this:
/var/tmp//ccjRO3sd.s:106:FATAL:Symbol __D1t6__T1AZ1A5_ctorMFZC1t6__T1AZ1A
already defined.
not using the default (either by explicit instantiation or removing it), or a
positive default value don't give any problem.
maybe also dmd has the same problem (not tested)
--
More information about the D.gnu
mailing list