[Issue 5010] Error messages for properties could be improved
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 9 20:04:06 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5010
Era Scarecrow <rtcvb32 at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rtcvb32 at yahoo.com
--- Comment #2 from Era Scarecrow <rtcvb32 at yahoo.com> 2013-02-09 20:03:58 PST ---
> struct A
> {
> @property void foo(uint x);
> }
>
> void main()
> {
> A a;
> a.foo = "bar"; // (1)
> }
>
>
> (1) causes "Error: not a property a.foo", which may look obvious here, but gets
> confusing with more complex types.
Also related (similar types) it should mention those that need down-casting,
or something more useful.
struct S {
//setters
void test(uint v) @property {}
void test2(ulong v) @property {}
}
ulong x;
S s;
s.test2 = x;
s.test = x; //Error: not a property s.test
--
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