gitgabrio commented on code in PR #6261:
URL:
https://github.com/apache/incubator-kie-drools/pull/6261#discussion_r1969225021
##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/types/GenFnType.java:
##########
@@ -40,18 +41,15 @@ public GenFnType(List<Type> argsGen, Type returnGen) {
@Override
public boolean isInstanceOf(Object o) {
- if (o instanceof FEELFunction) {
- FEELFunction oFn = (FEELFunction) o;
- List<List<Param>> signatures =
oFn.getParameters().stream().filter(signature -> signature.size() ==
argsGen.size()).collect(Collectors.toList());
- for (List<Param> signature : signatures) {
- if (signature.size() == argsGen.size() && IntStream.range(0,
argsGen.size()).allMatch(i ->
argsGen.get(i).conformsTo(signature.get(i).type))) {
- return true;
- }
+ if (o instanceof FEELFunction oFn) {
+ List<List<Param>> parameters = oFn.getParameters();
+ if(parameters.isEmpty()){
+ //this is used to consider function as parameter
+ return true;
Review Comment:
HI @bncriju
on second thought, I think we need to implement more check here, i.e. if the
expected input/output of the current GenFnType are compatible with invoke
methods of the provided function
--
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]