tkobayas commented on issue #6790:
URL:
https://github.com/apache/incubator-kie-drools/issues/6790#issuecomment-4850733645
```
package org.test;
import org.drools.model.codegen.execmodel.domain.PositionalParent;
import org.drools.model.codegen.execmodel.domain.Result;
declare Child extends PositionalParent
dept : String
end
rule Init when
then
insert( new Child("Mario", 40, "Sales") );
end
rule Check when
$c : Child( name == "Mario", age == 40, dept == "Sales" )
then
insert( new Result($c.getName()) );
end
```
it works without `declare PositionalParent end`, but it has a subtle
caveat... if `PositionalParent`'s package
(`org.drools.model.codegen.execmodel.domain`) has a DRL,
`ClassHierarchyManager.mergeFields` fails to find `PositionalParent`, so a
different constructor is generated `Child(String dept)`. -> build error
--
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]