[Issue 5010] Error messages for properties could be improved

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5010

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P2  |P3

--


[Issue 5010] Error messages for properties could be improved

2017-08-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5010

Mike  changed:

   What|Removed |Added

 CC||e...@sternheim.com

--- Comment #3 from Mike  ---
*** Issue 15158 has been marked as a duplicate of this issue. ***

--


[Issue 5010] Error messages for properties could be improved

2013-02-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5010


Era Scarecrow  changed:

   What|Removed |Added

 CC||rtcv...@yahoo.com


--- Comment #2 from Era Scarecrow  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: ---


[Issue 5010] Error messages for properties could be improved

2012-12-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5010


Adrian Matoga  changed:

   What|Removed |Added

 CC||e...@atari8.info


--- Comment #1 from Adrian Matoga  2012-12-12 09:33:35 PST ---
I'd add also the following:

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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---