Class CompoundTargetMayKeep

java.lang.Object
org.ek9lang.compiler.support.sharing.CompoundTargetMayKeep
All Implemented Interfaces:
BiPredicate<ISymbol,ISymbol>

public final class CompoundTargetMayKeep extends Object implements BiPredicate<ISymbol,ISymbol>
May a compound assignment (target += item, target :~: item) to a value of this type keep its operand? A container (a parameterised type, a bare T) does; so does a type of the program's own, whose operator is written in EK9 and may store it - as any call of the program's own may keep its argument (KeepsArgument; the verifier, 2026-10-21: registry += item, Registry's += adding to its list, was read as keeping nothing, so a loaned closeable was closed by its statement and then used). A built-in value (total += 5), a constrained type over one, and an enumeration copy.

This is the statement-ownership decision's FALLBACK (D80 follow-up; since lane closeable-matrix, 2026-10-21, the decision first reads the operator the target's type serves, as it reads a call's callee, and asks this only when no operator can be read - a generic's T): an UNNAMED closeable given to a compound assignment is then the statement's loan unless the target may keep it, where the target must also be able to HOLD an object of the operand's type (TypeMayHold) - a List of String or a type whose properties are all Strings keeps no closeable.

  • Constructor Details

    • CompoundTargetMayKeep

      public CompoundTargetMayKeep()
  • Method Details