Changing rules of operator overload lookup

This commit is contained in:
Krzosa Karol
2022-09-29 20:15:44 +02:00
parent 37489b2730
commit ab19ebc992
3 changed files with 22 additions and 15 deletions

View File

@@ -10,6 +10,8 @@ Vec3 :: struct;; x: F32; y: F32; z: F32
main :: (): int
a := Vec3{1,1,1}
b := Vec3{2,3,4}
// The expressions are replaced with the defined lambdas
c := a + b
Assert(c.x == 3 && c.y == 4 && c.z == 5)
d := -c