www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Error message clarity w.r.t. ref

reply Shriramana Sharma <samjnaa_dont_spam_me gmail.com> writes:
ref int foo(ref int x) { return x ; }

void main ()
{
    foo(3) ;
// Error: function rvalue_argument.foo (ref int x) is not callable using 
argument types (int)
// Comment: "argument ref int x of function rvalue_argument.foo cannot bind 
to an rvalue" would be clearer IMO

    int i ;
    ref ir = i ;
// Error: variable ref_type.main.ir only parameters or foreach declarations 
can be ref
// Comment: after the variable name add a colon, and add ", return values" 
after "parameters"
}

NOTE: Not creating pull request or bugzilla since procedure much more 
tortuous than posting to NG. (Sorry but I'm still catching up on lots of 
pending projects right now so...)

-- 

Oct 16 2015
parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Friday, 16 October 2015 at 10:12:50 UTC, Shriramana Sharma 
wrote:
 NOTE: Not creating pull request or bugzilla since procedure 
 much more tortuous than posting to NG. (Sorry but I'm still 
 catching up on lots of pending projects right now so...)
It takes barely more time to add a bug to bugzilla than it does to post in the newsgroup about it, and bugs are not tracked in the newsgroup. If you want something fixed, please add it to bugzilla: https://issues.dlang.org - Jonathan M Davis
Oct 16 2015
parent Shriramana Sharma <samjnaa_dont_spam_me gmail.com> writes:
Jonathan M Davis wrote:

 It takes barely more time to add a bug to bugzilla than it does
 to post in the newsgroup about it
To my pleasant surprise, I found you were right! :-) https://issues.dlang.org/show_bug.cgi?id=15216 --
Oct 17 2015