[Issue 4734] immutable return type specifier without parantheses confuses the compiler

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Aug 27 14:21:33 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=4734

Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #8 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
(In reply to Andrej Mitrovic from comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > In any case, at minimum, the error message needs to be improved.
> > 
> > How about we implement these error messages like this:
> > 
> > Error: function test.Test.foo () const is not callable using (this)
> > Error: function test.Test.foo () is not callable using const(this)
> > 
> > It's a little bit more informative than just a lone set of parens.
> 
> P.S. this is now:
> Error: immutable method test.Test.foo is not callable using a mutable object
> 
> I'm thinking of closing this, since the diagnostic is informative enough to
> know what went wrong.

Marking as resolved for this reason.

--


More information about the Digitalmars-d-bugs mailing list