[Issue 620] New: Can't use property syntax with a template function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 30 01:15:52 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=620
Summary: Can't use property syntax with a template function
Product: D
Version: 0.175
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: wbaxter at gmail.com
I'd like to call this a bug, but I can't find any place in the spec that states
this should work. However it seems logical that it would work given that the
property magic is just syntactic sugar that treats foo=x as a regular function
call foo(x).
---------------
int g_value;
void valuef(int v) { g_value = v; }
void valuet(T)(T v) { g_value = v; }
void main()
{
valuef = 42; // ok
valuet = 42; // Error: valuet is not an lvalue
// Error: cannot implicitly convert expression (42) of type
int to void
}
--
More information about the Digitalmars-d-bugs
mailing list