Initial Commit

This commit is contained in:
SoraKatadzuma committed 2026-12-06 13:52:57 -06:00
commit 528ccf1523
782 files changed
+145156

No files matched your search

@@ -0,0 +1,16 @@
import std::io;
trait same<T> { def same(&this, other: &T): bool; }
struct pt { var x: i64; }
def pt::same(&this, other: &pt): bool { return this.x == other.x; }
type point = pt;
type spot = point;
def check<T>(a: &T, b: &T): string {
if const T is same<T> { return a.same(b) ? "same" : "differ"; }
return "unknown";
}
def main(): void {
val a: point = pt { 1 };
val b: point = pt { 1 };
val c: spot = pt { 2 };
println($"{check::<pt>(&a, &b)} {check::<point>(&a, &b)} {check::<spot>(&c, &c)}");
}