Skip to content

#3327 follow-up: calls_out keyword and annotation captures (contract C1/C2) #3359

Closed

Description

@squid-protocol

Part of #3265, from the #3327 contract audit (docs/calls_out_rule_contract.md, classes K, A, S).

The calls_out contract says a keyword followed by ( is never a call (C2), and a metadata annotation is not an invocation (C1). The crucible census found these captured as callees:

  • K (keywords): livecode private/public/command/variable/case (~800 of 2,527 names), php foreach/isset/empty/elseif/array/unset/use/fn, csharp foreach/nameof/default/var, go func literals (436), rust pub(crate)/let (a, b)/fn( types, scala case (/val (, ada is (, solidity returns (/assembly, perl qw(/and/or/do, powershell break/exit/continue/default/Return, python/lua/zig not (/and (/or (, python in (/elif(, typescript async (, cpp static_assert/operator(), java this(, cobol PERFORM VARYING/UNTIL, agc TC Q (return idiom), scheme special forms and let binding lists.
  • A (annotations): java/kotlin/swift/dart/groovy/scala @Name(. Python/TS decorator factories @dec(x) are invocations and stay.
  • S (strings): tcl brace-quoted SQL (SELECT, WHERE) in command position.

Fix shape: _calls_out_ignore additions for K; a (?<!@) variant of CALLS_OUT_C_STYLE for the JVM/swift/dart family. Full verification chain: the rosetta calls_out_truth oracle, golden bless, and rosetta rebless. Precision only, so no recall should move.

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions