Skip to content

v1.0.6 — utility functions as first-class Callables

Choose a tag to compare

@kurushimee kurushimee released this 13 Jun 01:42

Hotfix for a false-positive analyzer error reported from real-project use (#88). Cut from v1.0.5 plus this fix only — unreleased Phase 2 work on main is not included.

Fixed

  • Bare utility-function references no longer error with Identifier "X" not declared in the current scope. (#88). Godot 4.x exposes utility functions as first-class Callables, so print.call_deferred(msg), arr.map(floor), var f := absi, and clamp.bind(0, 1) are all legal — the reduce_identifier arm that resolves them (gdscript_analyzer.cpp:4641-4652) was unported, and every Variant utility referenced outside callee position false-positived. Bare references to both utility families (Variant + GDScript-only) now reduce to a constant Callable, matching Godot's make_callable_type shape.
  • GDScript-only utilities (len, range, …) referenced bare previously escaped the error but carried no type; they now get the same constant Callable, fixing hover and := inference on those forms.
  • const PRINTER = print is accepted (the reference folds as a constant, mirroring Godot's reduced_value = Callable(...)), and print = 5 now fails with Godot's exact Cannot assign a new value to a constant. instead of the bogus not-declared error.

Fidelity

  • Every regression-test expectation is oracle-pinned against godot 4.6.3-stable --headless --check-only; the differential-oracle harness gains a utility-as-Callable fixture (19/19 fixtures at jaccard 1.0).
  • Both conformance ratchets hold at 1.0 with empty known-failures lists.
  • Diagnostics sweeps on both acceptance projects (a ~240-script OSS project and a ~2,300-script production project) compare clean against v1.0.5: error baselines hold, with the production project's #88-class false positives resolved.

Install

Download the binary for your platform, unpack, and point your editor's LSP client at it (stdio). Verify with gdls --versiongdls 1.0.6; checksums in SHA256SUMS.