[Issue 1328] New: Default class template parameters don't work as expected
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 10 06:01:45 PDT 2007
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 at digitalmars.com
ReportedBy: leo.dahlmann at 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.
--
More information about the Digitalmars-d-bugs
mailing list