If there are two different .drl files in the same package each of which
contains a function with name x, and if we have calls to x in both files,
expecting to call the local x, respectively:
(a) if the function signatures are identical, then this compiles without
errors, but at runtime only one of these functions will be called.
(b) if the signatures differ, you get inexplicable error messages for
correct calls, i.e.:
Rule Compilation error : [Rule name='Look4Beat']
appl/vote/Rule_Look4Beat_0.java (7:380) : The method foo(String, String)
in the type Foo is not applicable for the arguments (String)
As a test case for (a), use the file below and another one substituting '1'
by '2':
package x.y;
function void foo(String s ){ System.out.println( "foo 1: " + s ); }
rule "Object 1"
when
Object()
then
foo( "in file 1" );
end
Presumably the class names for functions cannot be derived from the function
name alone.
-W