blaise/tools
Andrew Haines 6eea55bc59 feat(semantic): allow unqualified calls to a procedural-typed field
Inside a method, an unqualified FFn(args) -- no 'Self.' prefix -- where
FFn is a procedural-typed field of the current class failed with
"Undeclared function/procedure 'FFn'".  Only the explicit Self.FFn(args)
form resolved.

Both call analysers now fall through to an implicit-Self field lookup
after the method lookup fails: a procedural-typed field of the current
class is dispatched through its stored pointer, validating argument count
and types (and the l-value requirement for var/out arguments) against the
field signature, exactly like the explicit-receiver path.

Codegen:
  * QBE: a shared EmitImplicitSelfProcFieldCall loads Self, indexes the
    field, and dispatches; var/out arguments are passed by reference and
    'of object' fields pass the captured Data as the implicit first arg.
    Used by both the statement and expression forms.
  * Native x86-64: both forms reuse EmitProcFieldCall with Self as the
    receiver.

The two new AST flags (TProcCall.IsProcFieldCall,
TFuncCallExpr.IsProcFieldCall) are recorded in the bif-coverage status
inventory as semantic-only (safe, not serialised), matching the existing
IsIndirectCall flags.

Covered by an IR test (loads Self, indirect dispatch) and end-to-end
tests on both backends for the expression and statement forms.
2026-06-25 01:14:42 +01:00
..
bif-coverage feat(semantic): allow unqualified calls to a procedural-typed field 2026-06-25 01:14:42 +01:00
kanban Modernise stdlib testing + tools: TList<String> over TStringList, drop .Free 2026-06-23 19:21:09 +01:00
migration-analyser fix: we don't have any code for migration-analyser yet. Disable tests for it. 2026-05-08 00:52:44 +01:00
.gitkeep Initial project scaffold 2026-04-20 14:22:10 +01:00