[Issue 7103] New: the -property switch vs. template functions with default template arguments
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Dec 13 04:58:25 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7103
Summary: the -property switch vs. template functions with
default template arguments
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: webby at beardmouse.org.uk
--- Comment #0 from Richard Webb <webby at beardmouse.org.uk> 2011-12-13 04:58:22 PST ---
if you compile the following code using the DMD 2.057 beta, using the -property
switch, then you get no warning or error.
/////////////////////////////////////////////////
import std.stdio;
struct duck
{
void quack(int I1, int I2 = 0)(bool louder = false)
{
if (louder)
writeln("QUACK");
else
writeln("quack");
}
}
void main()
{
duck d;
d.quack!(0);
}
/////////////////////////////////////////////////
However, if you change it to
d.quack!(0, 0);
then you get
Error: not a property d.quack
Shouldn't both cases behave the same?
--
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