www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1328] New: Default class template parameters don't work as expected

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1328

           Summary: Default class template parameters don't work as expected
           Product: D
           Version: 1.019
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: leo.dahlmann gmail.com


<code>
class Foo(T = char)
{

}

void main()
{
        Foo f; // Line 8
}
</code>

test.d(8): class test.Foo(T = char) is used as a type
test.d(8): variable test.main.f voids have no value

It only compiles if you use Foo!() as the type, but I think Foo should work,
too.


-- 
Jul 10 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1328


deewiant gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.019                       |1.018





Setting version to 1.018: 1.019 isn't out yet.


-- 
Jul 10 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1328


fvbommel wxs.nl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
           Keywords|                            |spec





This would be nice to have but it's an enhancement request, not a bug. Current
behavior is according to spec and AFAIK as designed.

Marked as enhancement and spec-related (since it would have to be changed to
implement this)


-- 
Jul 10 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1328


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |DUPLICATE



*** This issue has been marked as a duplicate of issue 1012 ***

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