// A generic value parameter (`$K: u32`) binds a literal (`Vec(3, i64)`) and an
// integral-float named const (`Vec(L, i64)` with `L : f64 : 4.0`) to the same
// integer a plain `4` would — the value-param arg folds through the shared
// const-int evaluator, so the integral-float rule (F0.4 attempt 8, Agra ruling)
// reaches value params too. The folded value is the array length `[K]i64`.
//
// The bind is range-checked against the declared `u32` (an out-of-range arg is a
// clean compile error — see 1134); a valid in-range value binds normally.
#import "modules/std.sx";

Vec :: struct ($K: u32, $T: Type) { data: [K]T; }

L : f64 : 4.0;

main :: () {
    a : Vec(3, i64) = ---;       // literal value param
    b : Vec(L, i64) = ---;       // integral-float named-const value param → 4
    print("a.len={} b.len={}\n", a.data.len, b.data.len);   // 3 and 4
}
