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/master 86091b178 -> c3d12bb6a


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/c3d12bb6
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/c3d12bb6
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/c3d12bb6

Branch: refs/heads/master
Commit: c3d12bb6aad1181e1c4c9118d6db9e1b082ab7c2
Parents: 86091b1
Author: Andrew Bayer <[hidden email]>
Authored: Tue Jul 25 17:36:38 2017 -0400
Committer: paulk <[hidden email]>
Committed: Thu Jul 27 03:48:32 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/c3d12bb6/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 + "]";
+    }
 }