navid/haze / 94d8e2a026845bd62732f6eb7c222b5a9c18a60511c534c648cee6fd4b471090 / samples/baseline_2.2/shadowed_const_error.hz

shadowed_const_error.hz

← samples/baseline_2.2 · 195 bytes · raw · download

const LIMIT i32 = 5

fn below_limit(n i32) i32
    : pre n < LIMIT
    => n

fn main() {
    const n = 3
    {
        const n = 7
        print(below_limit(n))
    }
    print(below_limit(n))
}