fix(lower): free-fn UFCS auto-address-of + lazy lowering (issue 0063)

A free function called via UFCS (recv.fn(args)) whose first param is *T
was passed the receiver by value (LLVM "Call parameter type does not
match function signature"), and a function reached only via UFCS was
declared but never emitted (undefined symbol at link).

The bare-name UFCS fallback now mirrors the qualified-method path: it
lazily lowers the target body and calls fixupMethodReceiver +
coerceCallArgs, so the value receiver gets the same implicit address-of
as a struct-defined method and mutations through *T are visible.

Regression: 0039-basic-free-fn-ufcs-pointer-receiver.sx.
This commit is contained in:
agra
2026-06-01 22:28:15 +03:00
parent a61685772d
commit 547148b8b6
6 changed files with 57 additions and 1 deletions

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1,2 @@
a=11 b=12 n=12
after reset n=0