fixed bug 452
[org.ibex.core.git] / src / org / ibex / Ibex.java
index 8d86da7..bd337f1 100644 (file)
@@ -345,8 +345,7 @@ public final class Ibex extends JS.Cloneable {
         }
         public Object call(Object a, Object b, Object c, Object[] rest, int nargs) throws JSExn {
             // GROSS hack
-            if (nargs == 9999) return t;
-            if (nargs != 1) throw new JSExn("FIXME can only call with one arg");
+            if (nargs != 1 && nargs != 9999) throw new JSExn("FIXME can only call with one arg");
             getStatic();
             if (t == null) throw new JSExn("No such template " + parentkey);
             t.apply((Box)a);