INITIAL GENERICS IMPL

This commit is contained in:
2025-04-15 03:21:57 -04:00
parent 993458f4be
commit 329b1d86ac
18 changed files with 607 additions and 381 deletions

View File

@@ -44,6 +44,7 @@ fn start() {
print("test: 0x");
print_hex(31);
println("");
generic();
exit(0);
}
@@ -74,6 +75,23 @@ fn structer(test: Test) {
println("");
}
struct GTest<T, U> {
a: T,
b: U,
}
fn generic() {
let gt = GTest {
a: 39,
b: "hello",
};
print("generic: ");
print_dec(gt.a);
print(", ");
print(gt.b);
println("");
}
fn thinger() {
print("estamos jugando\n");
}