navid/haze / 94d8e2a026845bd62732f6eb7c222b5a9c18a60511c534c648cee6fd4b471090 / samples/baseline_2.8/generic_modules.hz
generic_modules.hz
← samples/baseline_2.8 · 255 bytes · raw · download
// Cross-module generic type instantiation.
use lib/pair_mod {Pair, make_pair}
fn main() {
const p = make_pair(3, 4)
print(p.first + p.second)
const q = Pair[str, i32]{ first = "value", second = 9 }
print(q.first)
print(q.second)
}