groovy git commit: Add toString() override to ReturnStatement (closes #577)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

groovy git commit: Add toString() override to ReturnStatement (closes #577)

paulk
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 17b9ceea0 -> 16b281087


Add toString() override to ReturnStatement (closes #577)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/16b28108
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/16b28108
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/16b28108

Branch: refs/heads/GROOVY_2_6_X
Commit: 16b2810877c2821d15387ccf3d073ffed46fd9fe
Parents: 17b9cee
Author: Andrew Bayer <[hidden email]>
Authored: Tue Jul 25 17:36:38 2017 -0400
Committer: paulk <[hidden email]>
Committed: Thu Jul 27 03:49:39 2017 +1000

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/ast/stmt/ReturnStatement.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/16b28108/src/main/org/codehaus/groovy/ast/stmt/ReturnStatement.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/ast/stmt/ReturnStatement.java b/src/main/org/codehaus/groovy/ast/stmt/ReturnStatement.java
index 9490921..9e08ebd 100644
--- a/src/main/org/codehaus/groovy/ast/stmt/ReturnStatement.java
+++ b/src/main/org/codehaus/groovy/ast/stmt/ReturnStatement.java
@@ -65,4 +65,8 @@ public class ReturnStatement extends Statement {
         return expression instanceof ConstantExpression
             && ((ConstantExpression)expression).isNullExpression();
     }
+
+    public String toString() {
+        return super.toString() + "[expression:" + expression + "]";
+    }
 }