pibizza commented on code in PR #6086:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6086#discussion_r1763105973


##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/drlxparse/CoercedExpression.java:
##########
@@ -151,9 +153,22 @@ public CoercedExpressionResult coerce() {
             coercedLeft = left;
         }
 
+        checkCoercion(coercedLeft, coercedRight, leftClass, rightClass);
         return new CoercedExpressionResult(coercedLeft, coercedRight, 
rightAsStaticField);
     }
 
+    private void checkCoercion(TypedExpression coercedLeft, TypedExpression 
coercedRight, Class<?> leftClass, Class<?> rightClass) {
+        if (equalityExpr) {

Review Comment:
   Performance wise I am ignorant and you are probably right. My point is that 
if something that affects the behavious of an object is known at creation time 
of an object you should make the object behave accordingly. But I admit it that 
this is a minor point and we can keep it as it is. thank you.



-- 
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]

Reply via email to