From 7e66b7ae6b00a2e1652db32f01f0bf480508ef05 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sat, 14 Nov 2026 16:23:39 -0800 Subject: CLeanup Breakout Fix a half-dozen compiler bugs; various kinds of forward refs and readable types. Allow read-only self-types; and read-only methods. Anonymous inner functions are treated as methods. Better error messages in many places. --- chapter31/src/main/smp/sys/draw/Canvas.smp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chapter31/src/main/smp/sys/draw') diff --git a/chapter31/src/main/smp/sys/draw/Canvas.smp b/chapter31/src/main/smp/sys/draw/Canvas.smp index 2fbcf6ea..9ba3514a 100644 --- a/chapter31/src/main/smp/sys/draw/Canvas.smp +++ b/chapter31/src/main/smp/sys/draw/Canvas.smp @@ -3,7 +3,7 @@ struct Canvas { u32 height; u32[] pixels; - new Canvas = { int w, int h -> + new Canvas = { u32 w, u32 h -> i64 count = w; count *= h; if( w <= 0 || h <= 0 || count > sys.integer.MAX_I32 ) libc._exit(1); -- cgit v1.2.3