const std = #import("std");
const assert = std.assert;

const Error = error{
    unexpected_result,
};

const main = fn() Error!void {
    var buffer: [65]u8 = undefined;
    const slice = foo(5, buffer.&);
    assert(slice.length + 5 == buffer.length);
    const result: u32 = #cast(slice.length + 5 - buffer.length);
    if (result != 0) {
        return Error.unexpected_result;
    }
}
const foo = fn(n: usize, buffer: &[65]u8) []u8 {
    return buffer[n..];
}
