got type system working

This commit is contained in:
2025-08-25 21:51:50 -06:00
parent 0a315c5615
commit b2709ffc82
10 changed files with 858 additions and 91 deletions

View File

@@ -1,11 +1,6 @@
fn main(): String {
let a = 2;
a;
a = 3;
a = if(true) {"asdf"} else {"fdsa"};
a.b.c.d();
a = (b + c.d()); // comment
return a.b() ;
let a = "asdf";
return a ;
}
type User struct {
@@ -23,7 +18,7 @@ impl TestTrait for User {
return Self{id: id};
}
fn instance_method(self: Self): i64 {
return self.get_id();
return self.id;
}
fn default_impl(self: Self): i64 {
return self.instance_method();