[Issue 4497] inexpressive error message for const object method

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


Andrej Mitrovic  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||andrej.mitrov...@gmail.com
 Resolution||DUPLICATE


--- Comment #4 from Andrej Mitrovic  2012-12-23 
13:45:34 PST ---
*** This issue has been marked as a duplicate of issue 1730 ***

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


[Issue 4497] inexpressive error message for const object method

2010-08-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4497



--- Comment #3 from Trass3r  2010-08-03 06:01:11 PDT ---
I'm pretty sure I also had similar errors without the indicating "const" at the
end of the message.

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


[Issue 4497] inexpressive error message for const object method

2010-07-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4497


Steven Schveighoffer  changed:

   What|Removed |Added

 CC||schvei...@yahoo.com


--- Comment #2 from Steven Schveighoffer  2010-07-26 
06:20:03 PDT ---
I think the message is actually accurate.  I'll split out the relevant parts:

testbug.d(11): Error: function

testbug.Foo.getX ()  is not callable using argument types 
 () const

What's happening is, the hidden this parameter is passed as const since the
object is const, but getX doesn't accept a const Foo.

It's the same as if you had a function like this:

void foo(Foo x)

foo(f);

Since f is const, and foo(Foo) must accept a mutable foo.

However, most people see the "const" applying to the function, which is a
common misconception.

I think a better error message might look like this:

Error: function constobj.Foo.getX () cannot be called using a const Foo.

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


[Issue 4497] inexpressive error message for const object method

2010-07-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4497



--- Comment #1 from Trass3r  2010-07-24 04:39:33 PDT ---
Note that this is also true for objects passed to a function as "const Class
object"

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