From 127e8dcb386fa287f042f8eb62917e1c38f6ca71 Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Thu, 24 Oct 2024 14:10:07 +0200 Subject: [PATCH] fixing @as misbehaving --- lang/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/README.md b/lang/README.md index d0f667b..9b87762 100644 --- a/lang/README.md +++ b/lang/README.md @@ -547,7 +547,7 @@ white := Color.(255, 255, 255, 255) u32_to_color := fn(v: u32): Color return @bitcast(v) u32_to_u32 := fn(v: u32): u32 return v 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 } ```