porcelli commented on code in PR #6354:
URL:
https://github.com/apache/incubator-kie-drools/pull/6354#discussion_r2112917316
##########
drools-model/drools-mvel-parser/src/main/java/org/drools/mvel/parser/ast/expr/PointFreeExpr.java:
##########
@@ -33,17 +33,23 @@ public class PointFreeExpr extends Expression {
private final NodeList<Expression> right;
private final SimpleName operator;
+ private final SimpleName subOperator;
private boolean negated;
private final Expression arg1;
private final Expression arg2;
private final Expression arg3;
private final Expression arg4;
public PointFreeExpr( TokenRange tokenRange, Expression left,
NodeList<Expression> right, SimpleName operator, Boolean negated, Expression
arg1, Expression arg2, Expression arg3, Expression arg4 ) {
+ this(tokenRange, left, right, operator, null, negated, arg1, arg2,
arg3, arg4 );
+ }
+
+ public PointFreeExpr( TokenRange tokenRange, Expression left,
NodeList<Expression> right, SimpleName operator, SimpleName subOperator,
Boolean negated, Expression arg1, Expression arg2, Expression arg3, Expression
arg4 ) {
super(tokenRange);
this.left = left;
this.right = right;
this.operator = operator;
+ this.subOperator = subOperator;
Review Comment:
@mariofusco I hear you, but this is an interesting use case that I've seen:
```
$listOfBigIntegerType contains 123 //expected, but doesn't work as 123 needs
to be BigDecimal
$listOfBigDecimal contains new BigDecimal(123) // works, but not much legible
$listOfBigDecimal has[bigdec] 123 //expected use of pluggable operators
```
if not having the parameter...
```
$listOfBigDecimal hasBigDec 123 //no parameters
```
I see that users could live with hasBigDec, but I also see that has[bigdec]
with has[other_type] feels more legible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]