diff mbox

Go patch committed: Improve error message

Message ID mcrhagjjr7o.fsf@iant-glaptop.roam.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor June 27, 2013, 7:20 p.m. UTC
This patch from Rémy Oudompheng improves an error message for an invalid
use of [...] in a variable declaration.  The error message said it was
in a type conversion, but it was not.  Bootstrapped and ran Go testsuite
on x86_64-unknown-linux-gnu.  Committed to mainline and 4.8 branch.

Ian
diff mbox

Patch

diff -r 6412862fce26 go/parse.cc
--- a/go/parse.cc	Wed Jun 26 15:57:10 2013 -0700
+++ b/go/parse.cc	Thu Jun 27 12:17:15 2013 -0700
@@ -3040,7 +3040,7 @@ 
 		  && t->array_type()->length()->is_nil_expression())
 		{
 		  error_at(ret->location(),
-			   "invalid use of %<...%> in type conversion");
+			   "use of %<[...]%> outside of array literal");
 		  ret = Expression::make_error(loc);
 		}
 	      else