blob: e82d8473f25b3e01e85723b58efca4d0380858aa [file]
-- This used to cause
-- error: The termination argument's type must not depend on the function's varying parameters
def foo (as : Array Nat) (i := 0) (j := as.size - 1) : Array Nat :=
if j ≤ i then as
else
let newas := as.set! 0 0
foo newas (i+1) (j-1)
termination_by j - i