added type aliases, declaring impls

This commit is contained in:
Andrew Segavac
2021-06-13 10:38:13 -06:00
parent 972fbd064b
commit 02797309d9
5 changed files with 59 additions and 5 deletions

View File

@@ -48,3 +48,15 @@ fn get_user_id(): U64 {
type User struct {
id: U64,
}
impl User {
fn new(id: U64): Self {
return Self{
id: id,
};
}
fn get_id(self: Self): U64 {
return self.id;
}
}