Thread overview
[Issue 2294] New: negative default values for int template arguments does not work
Aug 19, 2008
d-bugmail
Oct 28, 2009
Don
Sep 22, 2010
Don
Sep 22, 2010
Don
August 19, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2294

           Summary: negative default values for int template arguments does
                    not work
           Product: D
           Version: 1.026
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Keywords: link-failure, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: fawzi@gmx.ch
OtherBugsDependingO 2291
             nThis:


something like this:
{{{
class MyClass(int startAxis1=-1){
    this() {}
}

void main(){
    MyClass!() aa=new MyClass!()();
}
}}}

fails to compile.

not using the default (either by explicit instantiation or removing it), or a positive default value don't give any problem.

I have found this error with gdmd, and posted it as issue http://d.puremagic.com/issues/show_bug.cgi?id=2291 (see also my attachment there) but I have tested with codepad and also dmd fails.


-- 

October 28, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2294



--- Comment #1 from Don <clugdbug@yahoo.com.au> 2009-10-28 05:47:46 PDT ---
I cannot reproduce on any version of DMD Windows. I've tried 0.175, 1.0, 1.020, 1.023, 1.028, 1.045, and they all work.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 22, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2294


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2010-09-22 12:35:59 PDT ---
I can reproduce this on codepad. Codepad claims to be using DMD 1.026, but 1.026 definitely works on Windows. This was probably fixed a very long time ago.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 22, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2294


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


--- Comment #3 from Don <clugdbug@yahoo.com.au> 2010-09-22 12:37:55 PDT ---
Without some evidence that this is still current, I'm marking this as closed. Reopen if still current, with information on which platform it is visible on.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------