digitalmars.D.bugs - [Issue 3857] New: Write property for arrays does not work properly
- d-bugmail puremagic.com (47/47) Feb 26 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3857
- d-bugmail puremagic.com (13/13) Mar 15 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3857
- d-bugmail puremagic.com (10/10) Jan 09 2011 http://d.puremagic.com/issues/show_bug.cgi?id=3857
- d-bugmail puremagic.com (12/12) Oct 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=3857
http://d.puremagic.com/issues/show_bug.cgi?id=3857 Summary: Write property for arrays does not work properly Product: D Version: 2.040 Platform: Other OS/Version: All Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: schveiguy yahoo.com 14:08:01 PST --- If I were to define a write property for arrays foo that takes an int arg, none of the following prototypes work: main code: int[] x; x.foo = 1; test cases: property void foo(T)(T[] arr, int x) {} or void foo(T)(T[] arr, int x) {} outputs: testbug.d(10): Error: template testbug.foo(T) does not match any function template declaration testbug.d(10): Error: template testbug.foo(T) cannot deduce template function from argument types !()(int[]) testbug.d(10): Error: x.foo is not an lvalue test case: property void foo(int[] arr, int x) {} outputs: testbug.d(4): Error: properties can only have zero or one parameter test case: void foo(int[] arr, int x) {} outputs: testbug.d(10): Error: function testbug.foo (int[] arr, int x) is not callable using argument types (int[]) testbug.d(10): Error: expected 2 function arguments, not 1 testbug.d(10): Error: x.foo is not an lvalue testbug.d(10): Error: cannot implicitly convert expression (1) of type int to void I think at least the two variations that use property should work. They are pretty unambiguous. This is blocking my work on the array pre-allocate patch. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 26 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3857 Steven Schveighoffer <schveiguy yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P3 Severity|critical |normal 13:07:27 PDT --- Downgrading severity. This is no longer blocking the array append work, since it was determined that a property was not the best syntax. I still think this should work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 15 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3857 Andrei Alexandrescu <andrei metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |andrei metalanguage.com AssignedTo|nobody puremagic.com |andrei metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 09 2011
http://d.puremagic.com/issues/show_bug.cgi?id=3857 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |FIXED 20:14:21 PDT --- Seems to be fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 21 2012