lazy functions with set parameter sizes will report an error if no properly specced. Fixes #1064

This commit is contained in:
gnembon committed 2021-09-06 23:05:13 -03:00
1 parent 229d0b037b
commit 36df542072
6 files changed
+45 -12

No files matched your search

@@ -32,7 +32,7 @@ public class BlockIterators {
public static void apply(Expression expression)
{
// lazy cause of lazy expression
expression.addLazyFunction("scan", -1, (c, t, llv) ->
expression.addLazyFunction("scan", (c, t, llv) ->
{
if (llv.size() < 3) throw new InternalExpressionException("'scan' needs many more arguments");
List<Value> lv = Fluff.AbstractFunction.unpackLazy(llv.subList(0, llv.size()-1), c, Context.NONE);
@@ -140,7 +140,7 @@ public class BlockIterators {
});
// must be lazy
expression.addLazyFunction("volume", -1, (c, t, llv) ->
expression.addLazyFunction("volume", (c, t, llv) ->
{
CarpetContext cc = (CarpetContext)c;
if (llv.size() < 3) throw new InternalExpressionException("'volume' needs many more arguments");