This commit is contained in:
Judah Caruso 2025-06-28 20:54:33 -06:00
parent d58f238fc9
commit 5038517d72

View file

@ -42,6 +42,47 @@ strings :: #import "String"; // @future
assert x == y assert x == y
assert x != z assert x != z
// def (
// Add = poly[T] proc(x T, y T) T do return x + y end
// Sub = poly[T] proc(x T, y T) T do return x - y end
// Mul = poly[T] proc(x T, y T) T do return x * y end
// Div = poly[T] proc(x T, y T) T do return x / y end
// )
// def (
// Addi = Add[int]
// Addf = Add[float]
// Subi = Sub[int]
// Subf = Sub[float]
// Muli = Mul[int]
// Mulf = Mul[float]
// Divi = Div[int]
// Divf = Div[float]
// )
// def Foo = struct {
// x int = 1
// y int = 2
// z int = 3
// }
// def Value = union {
// i int
// f float
// b bool
// }
// def Kind = enum {
// a
// b
// c
// d
// }
// var foo = Foo{ x = 10, y = 20, z = 30 }
// var val = Value{ f = 3.14 }
// var kind = Kind.a
END); END);
interp: Interp; interp: Interp;