Summary
Std no longer compiles against the latest Rux compiler dev. After rux-lang/Rux#136 (fix: LookupFunction no longer silently falls back to first overload, commit 4d3b0a8), the overload resolver enforces IsAssignableTo for the arguments of a call. Many Std call sites pass an untyped integer literal (type int) to a parameter of a different integer type (uint32, int32, uint). Those conversions are not implicitly allowed (signed→unsigned and narrowing require an explicit as), so they now fail to resolve and Std does not build.
Before #136 the resolver silently returned the (only/first) overload without checking argument assignability, so these latent mismatches compiled. Nothing in Std changed — the compiler stopped ignoring pre-existing type errors.
This is not macOS-specific: the affected files include platform-neutral code (Fatal.rux, String.rux), so every target's Std build is affected.
Reproduction
Build any Std-dependent package with a Rux compiler at or after #136 (merge 78059a7):
error: no matching overload for 'Exit' with argument types (int) Src/Fatal.rux:18
error: no matching overload for 'Set' with argument types (*opaque, uint, int) Src/Memory.rux
error: no matching overload for 'Alloc' with argument types (int) Src/String.rux
(The frontend stops at the first error per file, so the list above is not exhaustive — more sites surface once each is fixed.)
Representative failing call sites
Src/Fatal.rux:18 — Exit(1) but Exit(code: uint32) (Src/System.rux).
Src/Memory.rux Zero (all byte-loop targets, e.g. line 323) — Set(ptr, size, 0) but Set(ptr: *opaque, size: uint, value: int32).
Src/String.rux:165 — Alloc(0) but Alloc(size: uint).
Suggested fix
Give the literals the parameter's type (matches the repo convention that typed integer literals are explicit, e.g. 0u64, -1i32):
Exit(1u32)
Set(ptr, size, 0i32)
Alloc(0u)
and likewise for the other untyped-literal arguments throughout Std.
Environment
- Rux
dev at 2935404 (post-#136) — fails. Pre-#136 (e.g. 29c59ec) — builds fine.
- Reproduced building
Std on macOS (arm64 host, x86-64 Mach-O output), but the root cause is platform-independent.
Summary
Stdno longer compiles against the latest Rux compilerdev. After rux-lang/Rux#136 (fix: LookupFunction no longer silently falls back to first overload, commit4d3b0a8), the overload resolver enforcesIsAssignableTofor the arguments of a call. ManyStdcall sites pass an untyped integer literal (typeint) to a parameter of a different integer type (uint32,int32,uint). Those conversions are not implicitly allowed (signed→unsigned and narrowing require an explicitas), so they now fail to resolve andStddoes not build.Before #136 the resolver silently returned the (only/first) overload without checking argument assignability, so these latent mismatches compiled. Nothing in
Stdchanged — the compiler stopped ignoring pre-existing type errors.This is not macOS-specific: the affected files include platform-neutral code (
Fatal.rux,String.rux), so every target'sStdbuild is affected.Reproduction
Build any
Std-dependent package with a Rux compiler at or after #136 (merge78059a7):(The frontend stops at the first error per file, so the list above is not exhaustive — more sites surface once each is fixed.)
Representative failing call sites
Src/Fatal.rux:18—Exit(1)butExit(code: uint32)(Src/System.rux).Src/Memory.ruxZero(all byte-loop targets, e.g. line 323) —Set(ptr, size, 0)butSet(ptr: *opaque, size: uint, value: int32).Src/String.rux:165—Alloc(0)butAlloc(size: uint).Suggested fix
Give the literals the parameter's type (matches the repo convention that typed integer literals are explicit, e.g.
0u64,-1i32):Exit(1u32)Set(ptr, size, 0i32)Alloc(0u)and likewise for the other untyped-literal arguments throughout
Std.Environment
devat2935404(post-#136) — fails. Pre-#136 (e.g.29c59ec) — builds fine.Stdon macOS (arm64 host, x86-64 Mach-O output), but the root cause is platform-independent.