I thought you might have - it's bound to be some freaky situation you must have run into. I suggest that you experiment a little.
Does this error happen when you have nothing but a function with this signature on a .drl file?
Does it also occur with some other simple type, or with a class?
Do you have any particular setup for the builder?
-W
Alas, I have the same problem with this code:
function ArrayList nextPoint( int N, int t1, int sec, double[] a, double v )
{ int Nxt = N+1;
int Nxt2 = Nxt * 2;
if(Nxt2 >= a.length-1)
return null;
int N2 = N * 2;
double p1 = a[N2];
double l1 = a[N2+1];
double p2 = a[Nxt2];
double l2 = a[Nxt2+1];
double D = 1.0; // GreatCircle.sphericalDistance(p1, l1, p2, l2);
int dt = sec - t1;
double ds = dt * v;
if(ds > D){
int t2 = (int) (t1 + D / v);
return nextPoint(Nxt, t2, sec, a, v);
} else {
double az = 1.0; //GreatCircle.sphericalAzimuth(p1, l1, p2, l2);
double[] sb = new double[1]; //GreatCircle.sphericalBetween(p1, l1, ds,
az, 1);
ArrayList al = new ArrayList();
al.add(N);
al.add(t1);
al.add(new double[]{sb[2], sb[3]});
al.add(az);
return al;
} }
Only when I remove brackets after "double" in the parameter list like this
"function ArrayList nextPoint( int N, int t1, int sec, double a, double v
)", the error message "unable to resolve type while building function"
disappear. I have downloaded Drools distribution from this link
http://download.jboss.org/drools/release/5.2.0.Final/drools-distribution-5.2.0.Final.zip.
Same situation I have with 5.3.0 distribution.
--
View this message in context: http://drools.46999.n3.nabble.com/Functions-with-array-parameters-double-cease-to-compile-in-5-2-0-tp3251260p3255704.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users