[Issue 7600] Generate better error message with lvalue mismatch

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 27 10:20:56 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7600


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #1 from bearophile_hugs at eml.cc 2012-02-27 10:20:54 PST ---
(In reply to comment #0)

> test.d(8): Error: function test.foo (ref string x) is not callable using
> argument types (string)
> 
> test.d(10): Error: function test.bar (ref int x) is not callable using argument
> types (immutable(int))
> test.d(10): Error: constant 0 is not an lvalue
> 
> The error for the 'foo' function should generate two error messages just like
> the error for 'bar. 
> 
> It could print: 'Error: constant "var" is not an lvalue'. This is especially
> useful in templated functions.

Or maybe better, generate a single error message in both cases, something like:

test.d(10): Error: function test.bar (ref int x) is not callable using argument
types (immutable(int)), constant 0 is not an lvalue.

-- 
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