Indeed. It seems that, from 5.2.0 on, when there is a DRL file containing a function with a signature that contains a parameter that is an array of some simple type foo (int, double,...) and a scalar parameter of the same type and another function with a similar signature, an inappropriate syntax error is flagged: <br>
[ &lt;functionname&gt; : unable to resolve type while building function ]<br><br>E.g.<br>function nextPoint( int[] a, int n ){ }<br>function prevpoint( int[] a, int n ){ }<br><br>@ru: Splitting the DRL might be a workaround, but this might not be easy as this is generated code.<br>
<br>-W<br><br><br><br><div class="gmail_quote">On 16 August 2011 17:10, ru <span dir="ltr">&lt;<a href="mailto:sorokin@oogis.ru">sorokin@oogis.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Situation definitely treaky - I am working as author on DroolsTab plugin to<br>
Protege (<a href="http://protegewiki.stanford.edu/wiki/DroolsTab" target="_blank">http://protegewiki.stanford.edu/wiki/DroolsTab</a>). In this project<br>
drl file is generated programmatically and sent through pipe to<br>
PackageBuilder. I did some experiments as you suggested. Results:<br>
<br>
1. Only one function in package does not produce error messages<br>
2. Two similar functions produce only one error message &quot;In package<br>
TestExecutor error: [ prevPoint : unable to resolve type while building<br>
function<br>
 ]<br>
 function name: prevPoint&quot; and allways on last function in spite of their<br>
order.<br>
<br>
Here is corresponding drl file:<br>
<br>
package TestExecutor<br>
<br>
import ru.oogis.pins.*<br>
import ru.oogis.dro.*<br>
import ru.igis.omtab.*<br>
import java.util.*<br>
import ru.oogis.util.DroClock<br>
import com.bbn.openmap.proj.coords.LatLonPoint<br>
import edu.stanford.smi.protege.model.Cls<br>
import edu.stanford.smi.protege.model.Slot<br>
import edu.stanford.smi.protege.model.Project<br>
import edu.stanford.smi.protege.model.Instance<br>
import edu.stanford.smi.protege.model.KnowledgeBase<br>
import edu.stanford.smi.protege.server.RemoteProjectManager<br>
import java.io.*<br>
import com.bbn.openmap.omGraphics.OMGraphicList<br>
import groovy.lang.Binding<br>
import groovy.lang.GroovyShell<br>
import java.awt.Component<br>
import com.bbn.openmap.layer.location.LocationLayer<br>
import com.bbn.openmap.layer.location.LocationHandler<br>
import clojuretab.ClojureTab<br>
import com.bbn.openmap.MapBean<br>
import com.bbn.openmap.proj.GreatCircle<br>
import com.bbn.openmap.layer.e00.E00Layer<br>
import com.bbn.openmap.omGraphics.OMPoly<br>
import com.bbn.openmap.proj.ProjMath<br>
<div class="im"><br>
function ArrayList nextPoint( int N, int t1, int sec, double[] a, double v )<br>
{ int Nxt = N+1;<br>
int Nxt2 = Nxt * 2;<br>
if(Nxt2 &gt;= a.length-1)<br>
    return null;<br>
int N2 = N * 2;<br>
double p1 = a[N2];<br>
double l1 = a[N2+1];<br>
double p2 = a[Nxt2];<br>
double l2 = a[Nxt2+1];<br>
</div>double D = GreatCircle.sphericalDistance(p1, l1, p2, l2);<br>
<div class="im">int dt = sec - t1;<br>
double ds = dt * v;<br>
if(ds &gt; D){<br>
    int t2 = (int) (t1 + D / v);<br>
    return nextPoint(Nxt, t2, sec, a, v);<br>
} else {<br>
</div>    double az = GreatCircle.sphericalAzimuth(p1, l1, p2, l2);<br>
    double[] sb = GreatCircle.sphericalBetween(p1, l1, ds, az, 1);<br>
<div class="im">    ArrayList al = new ArrayList();<br>
    al.add(N);<br>
    al.add(t1);<br>
    al.add(new double[]{sb[2], sb[3]});<br>
    al.add(az);<br>
    return al;<br>
} }<br>
<br>
</div>function ArrayList prevPoint( int N, int t1, int sec, double[] a, double v )<br>
{ int Npv = N-1;<br>
int Npv2 = Npv * 2;<br>
if(Npv2 &lt; 0)<br>
<div class="im">    return null;<br>
int N2 = N * 2;<br>
double p1 = a[N2];<br>
double l1 = a[N2+1];<br>
</div>double p2 = a[Npv2];<br>
double l2 = a[Npv2+1];<br>
double D = GreatCircle.sphericalDistance(p1, l1, p2, l2);<br>
<div class="im">int dt = sec - t1;<br>
double ds = dt * v;<br>
if(ds &gt; D){<br>
    int t2 = (int) (t1 + D / v);<br>
</div>    return prevPoint(Npv, t2, sec, a, v);<br>
} else {<br>
    double az = GreatCircle.sphericalAzimuth(p1, l1, p2, l2);<br>
    double[] sb = GreatCircle.sphericalBetween(p1, l1, ds, az, 1);<br>
<div class="im">    ArrayList al = new ArrayList();<br>
    al.add(N);<br>
    al.add(t1);<br>
    al.add(new double[]{sb[2], sb[3]});<br>
    al.add(az);<br>
    return al;<br>
} }<br>
<br>
</div>In 5.1.1 all have been compiling well and working great :) :(<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Functions-with-array-parameters-double-cease-to-compile-in-5-2-0-tp3251260p3258930.html" target="_blank">http://drools.46999.n3.nabble.com/Functions-with-array-parameters-double-cease-to-compile-in-5-2-0-tp3251260p3258930.html</a><br>

</font><div><div></div><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>