mariofusco commented on code in PR #5639:
URL:
https://github.com/apache/incubator-kie-drools/pull/5639#discussion_r1436021365
##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/Consequence.java:
##########
@@ -162,6 +163,8 @@ public MethodCallExpr createCall(String consequenceString,
BlockStmt ruleVariabl
MethodCallExpr executeCall;
switch (context.getRuleDialect()) {
+ case PROTOTYPE:
+ rewriteConsequenceForPrototype(ruleConsequence,
usedDeclarationInRHS);
case JAVA:
rewriteReassignedDeclarations(ruleConsequence,
usedDeclarationInRHS);
executeCall = executeCall(ruleVariablesBlock, ruleConsequence,
usedDeclarationInRHS, onCall);
Review Comment:
I must admit that for now I didn't think to much about this and I just did
the quickest implementation to make that first test case to pass, but yes I
think it's ok to say that the PROTOTYPE dialect is a variation of the JAVA one
where we rewrite all the statement like `fact.field = value` as
`fact.set("field", value)`.
--
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]