Patchwork Go patch committed: Better error message for single- multiple- value

login
register
mail settings
Submitter Ian Taylor
Date Sept. 21, 2012, 10:11 p.m.
Message ID <mcripb7owkl.fsf@google.com>
Download mbox | patch
Permalink /patch/185960/
State New
Headers show

Comments

Ian Taylor - Sept. 21, 2012, 10:11 p.m.
This patch to the Go frontend adds some missing dashes to error
messages.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline and 4.7 branch.

Ian

Patch

diff -r fb59d6712068 go/gogo.cc
--- a/go/gogo.cc	Fri Sep 21 14:06:10 2012 -0700
+++ b/go/gogo.cc	Fri Sep 21 15:05:27 2012 -0700
@@ -4224,7 +4224,7 @@ 
 	  else if (type->is_call_multiple_result_type())
 	    {
 	      error_at(this->location_,
-		       "single variable set to multiple value function call");
+		       "single variable set to multiple-value function call");
 	      type = Type::make_error_type();
 	    }
 
diff -r fb59d6712068 go/types.cc
--- a/go/types.cc	Fri Sep 21 14:06:10 2012 -0700
+++ b/go/types.cc	Fri Sep 21 15:05:27 2012 -0700
@@ -421,7 +421,7 @@ 
 
     case TYPE_CALL_MULTIPLE_RESULT:
       if (reason != NULL)
-	*reason = "invalid use of multiple value function call";
+	*reason = "invalid use of multiple-value function call";
       return false;
 
     default:
@@ -627,8 +627,8 @@ 
       if (rhs->is_call_multiple_result_type())
 	{
 	  if (reason != NULL)
-	    reason->assign(_("multiple value function call in "
-			     "single value context"));
+	    reason->assign(_("multiple-value function call in "
+			     "single-value context"));
 	  return false;
 	}
     }