yurloc opened a new issue, #5706:
URL: https://github.com/apache/incubator-kie-drools/issues/5706
Parent issue:
- #5678
Failing test:
`org.drools.model.codegen.execmodel.CompilerTest#testChainOfMethodCallInConstraintSub`
Note: `PATTERN_DSL` only
Rule code snippet:
```
$p : Person( address.(city.startsWith("I") && city.length() == 5 ) )
```
Error output:
```
### parse : ANTLR4_PARSER_ENABLED = true
java.lang.AssertionError: [Message [id=1, level=ERROR,
path=src/main/java/defaultpkg/PFA/LambdaPredicateFAECF003FA1F7B02276D174B3E3A28E2.java,
line=22, column=809
text=Type mismatch: cannot convert from Address to boolean], Message
[id=2, level=ERROR,
path=src/main/java/defaultpkg/PFA/LambdaPredicateFAECF003FA1F7B02276D174B3E3A28E2.java,
line=0, column=0
text=Java source of
src/main/java/defaultpkg/PFA/LambdaPredicateFAECF003FA1F7B02276D174B3E3A28E2.java
in error:
package defaultpkg.PFA;
import static defaultpkg.Rules029EE342789B9ECE6C6C0AEA5F2505EC.*;
import org.drools.model.codegen.execmodel.domain.Person;
import defaultpkg.*;
import org.drools.modelcompiler.dsl.pattern.D;
@org.drools.compiler.kie.builder.MaterializedLambda()
public enum LambdaPredicateFAECF003FA1F7B02276D174B3E3A28E2 implements
org.drools.model.functions.Predicate1<org.drools.model.codegen.execmodel.domain.Person>,
org.drools.model.functions.HashedExpression {
INSTANCE;
public static final String EXPRESSION_HASH =
"8D259D9F1DDB57E5CB829B926CC8A8B4";
public java.lang.String getExpressionHash() {
return EXPRESSION_HASH;
}
@Override()
public boolean test(org.drools.model.codegen.execmodel.domain.Person
_this) throws java.lang.Exception {
return _this.getAddress();
}
@Override()
public org.drools.model.functions.PredicateInformation
predicateInformation() {
org.drools.model.functions.PredicateInformation info = new
org.drools.model.functions.PredicateInformation("address.(city.startsWith(\"I\")
&& city.length() == 5 )");
info.addRuleNames("R", "r0.drl");
return info;
}
}
]]
at
org.drools.model.codegen.execmodel.BaseModelTest.createKieBuilder(BaseModelTest.java:157)
at
org.drools.model.codegen.execmodel.BaseModelTest.createKieBuilder(BaseModelTest.java:132)
at
org.drools.model.codegen.execmodel.BaseModelTest.getKieContainer(BaseModelTest.java:121)
at
org.drools.model.codegen.execmodel.BaseModelTest.getKieContainer(BaseModelTest.java:114)
at
org.drools.model.codegen.execmodel.BaseModelTest.getKieSession(BaseModelTest.java:110)
at
org.drools.model.codegen.execmodel.BaseModelTest.getKieSession(BaseModelTest.java:106)
at
org.drools.model.codegen.execmodel.CompilerTest.testChainOfMethodCallInConstraintSub(CompilerTest.java:990)
```
--
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]