objectionary / objectionary/lints

`redundant-attachment` lint misinterprets declared `ρ` causing false positives in `eo-runtime`

Open
#1,301 1 comment 0 reactions 1 assignee View on GitHub

@maxonfjvipon is already working on this.

Since Aug 23, 2026.

bug good-title
Dominant language
Java
Stars
14
Forks
39
Avg merge
22h 54m
Merged PRs (30d)
90

Description

Third one from making the receiver explicit in eo-runtime, after #1299 and #1300. This one is subtler, because the lint is reasoning correctly from a premise that stops holding.

redundant-attachment reports an auto-named object when its name is unreferenced and eo:outer-refs is empty:

<xsl:if test="empty(eo:outer-refs(.)) and (count($refs)=0 or ...)">

The comment explains why the second half matters: dropping the name inlines the object, and a ξ.ρ.-based reference reaching past its own voids into the enclosing scope would then be caught by anonymous-formation instead.

Once the head declares ^, ρ is one of the object's own voids. A ξ.ρ. reference no longer reaches past them, so outer-refs comes back empty for formations that plainly do reach outward, and thirteen of them in eo-runtime get flagged. In while.eo:

^.^.^.max.gt ^.iter > [^ i] >>

That body reads max and iter from two different enclosing scopes. Nothing about it became self-contained; only the spelling of the receiver changed.

Dropping the suffix does satisfy the lint, but the formatter then rewrites the call site into vertical-argument form, and that reshaping changed the ρ chains enough to break map, while, range and input when we tried it.

Treat ρ as reaching outward even when declared — it is the receiver, and its value comes from the dispatch site rather than from inside the object. The distinction the rule wants is between references satisfied by the object's own parameters and references satisfied by its context, and ρ has always been the latter.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.