fixing @as misbehaving

This commit is contained in:
Jakub Doka 2024-10-24 14:10:07 +02:00
parent 9c43dafcf5
commit 127e8dcb38
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -547,7 +547,7 @@ white := Color.(255, 255, 255, 255)
u32_to_color := fn(v: u32): Color return @bitcast(v) u32_to_color := fn(v: u32): Color return @bitcast(v)
u32_to_u32 := fn(v: u32): u32 return v u32_to_u32 := fn(v: u32): u32 return v
main := fn(): int { main := fn(): int {
return u32_to_color(@bitcast(white)).r + @as(Color, @bitcast(u32_to_u32(@bitcast(white)))).g return u32_to_color(@bitcast(white)).r + @as(Color, @bitcast(u32_to_u32(@bitcast(Color.{r: 1, g: 1, b: 1, a: 1})))).g
} }
``` ```