internal dafny error: Index was out of range.

Dec 8, 2013 at 12:35 PM
The following code gives me the error:

module InternalError
{
datatype List<T> = Empty | And(T, List<T>)

function method Take<T>(list: List<T>, count: int, result: List<T>) : List<T>
requires count >= 0;
{
    if count == 0 then result else Take(Tail(list, count - 1, And(Head(list), result)))
}
}

The definition of Take is not done. I just wanted to report the error :)
Coordinator
Dec 9, 2013 at 10:17 PM
Thanks for the bug report. Now fixed (change set 67b45b02a2b2).

Rustan