added generics without type instantiation

This commit is contained in:
Andrew Segavac
2021-10-30 22:03:12 -06:00
parent 742c271732
commit 51c698ba5d
7 changed files with 81 additions and 63 deletions

View File

@@ -48,6 +48,10 @@ type User struct {
id: i64,
}
type Generic[T] struct {
value: T,
}
impl User {
fn new(id: i64): Self {
return Self{