//! returns: 99
//! Test returning optional records from functions.

record Vector {
    x: i32,
    y: i32,
    z: i32
}

fn strt() -> ?Vector {
    return Vector { x: 1, y: 2, z: 3 };
}

@default fn main() -> u32 {
    if let s = strt() {
        if s.x == 1 and s.y == 2 and s.z == 3 {
            return 99;
        }
    }
    return 1;
}
