You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/06/20 05:36:58 UTC

[groovy] branch master updated: GROOVY-9602: return more specific type for ifS/ifElseS helper methods in GeneralUtils

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 9375459  GROOVY-9602: return more specific type for ifS/ifElseS helper methods in GeneralUtils
9375459 is described below

commit 9375459763f0d664d0acbc9ce120a03b5a1da4ad
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Jun 20 15:36:49 2020 +1000

    GROOVY-9602: return more specific type for ifS/ifElseS helper methods in GeneralUtils
---
 .../org/codehaus/groovy/ast/tools/GeneralUtils.java | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
index f91ffb9..833e40c 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/GeneralUtils.java
@@ -564,7 +564,12 @@ public class GeneralUtils {
         return sameX(getterThisX(cNode, pNode), getterX(cNode, other, pNode));
     }
 
-    public static Statement ifElseS(final Expression cond, final Statement thenStmt, final Statement elseStmt) {
+    @Deprecated
+    public static Statement ifElseS$$bridge(final Expression cond, final Statement thenStmt, final Statement elseStmt) {
+        return ifElseS(cond, thenStmt, elseStmt);
+    }
+
+    public static IfStatement ifElseS(final Expression cond, final Statement thenStmt, final Statement elseStmt) {
         return new IfStatement(
                 cond instanceof BooleanExpression ? (BooleanExpression) cond : boolX(cond),
                 thenStmt,
@@ -572,11 +577,21 @@ public class GeneralUtils {
         );
     }
 
-    public static Statement ifS(final Expression cond, final Expression trueExpr) {
+    @Deprecated
+    public static Statement ifS$$bridge(final Expression cond, final Expression trueExpr) {
+        return ifS(cond, trueExpr);
+    }
+
+    public static IfStatement ifS(final Expression cond, final Expression trueExpr) {
         return ifElseS(cond, stmt(trueExpr), EmptyStatement.INSTANCE);
     }
 
-    public static Statement ifS(final Expression cond, final Statement trueStmt) {
+    @Deprecated
+    public static Statement ifS$$bridge(final Expression cond, final Statement trueStmt) {
+        return ifS(cond, trueStmt);
+    }
+
+    public static IfStatement ifS(final Expression cond, final Statement trueStmt) {
         return ifElseS(cond, trueStmt, EmptyStatement.INSTANCE);
     }