misc/sparse-decoration.xsl:17 reports "Sparse decoration is prohibited" for a
formation whose only attribute is a void φ, that is [@] > input. The
predicate checks count(o[...])=1 and o[...][1][@name='φ'], but never checks
that the φ child carries a @base. For [@] > input the parser emits
<o base="∅" line="16" name="φ"/>, and the lint counts it as a decoration.
That is wrong because a void φ is not a decoration at all — it is a free
attribute the caller must supply, the abstract-interface idiom. There is
nothing to inline into it and nothing to widen; the object has no body. In
objectionary/eo this hits eo-runtime/src/main/eo/input.eo:16 and
eo-runtime/src/main/eo/output.eo:15, both of which exist precisely so that
input.dead, bytes.as-input and friends can decorate them.
The fix is to add @base to the φ test in the predicate — for instance require
o[...][1][@name='φ'][@base != '∅'] — so that a void φ is skipped the same way
errors/decorated-formation.xsl already distinguishes a bound φ from a void one.
misc/sparse-decoration.xsl:17reports "Sparse decoration is prohibited" for aformation whose only attribute is a void φ, that is
[@] > input. Thepredicate checks
count(o[...])=1ando[...][1][@name='φ'], but never checksthat the φ child carries a
@base. For[@] > inputthe parser emits<o base="∅" line="16" name="φ"/>, and the lint counts it as a decoration.That is wrong because a void φ is not a decoration at all — it is a free
attribute the caller must supply, the abstract-interface idiom. There is
nothing to inline into it and nothing to widen; the object has no body. In
objectionary/eothis hitseo-runtime/src/main/eo/input.eo:16andeo-runtime/src/main/eo/output.eo:15, both of which exist precisely so thatinput.dead,bytes.as-inputand friends can decorate them.The fix is to add
@baseto the φ test in the predicate — for instance requireo[...][1][@name='φ'][@base != '∅']— so that a void φ is skipped the same wayerrors/decorated-formation.xslalready distinguishes a bound φ from a void one.