got generics working

This commit is contained in:
2022-10-10 17:13:17 -06:00
parent 4c1c13149d
commit c4be846c1d
6 changed files with 166 additions and 55 deletions

View File

@@ -19,9 +19,9 @@ impl [K, V: MyTrait] Pair[K, V] {
}
fn main(): i64 {
let a = Pair{
let a = Pair[i64, Value]{
k: 4,
v: Value{value: 6},
};
return a.get_value(999);
return a.get_value[i64](999).value;
}