Skip to content

Side-effects of rule arguments are duplicated #575

Closed

Description

@lucic71

In rules like:

fn f1<T>(a0: T) {
  a0.call_function();
  a0
}

If a0 has side effects, for example a0 = i++ then the post increment runs two times, which is wrong.

We should write the rules as:

fn f1<T>(a0: T) {
  let __a0 = a0;
  __a0.call_function();
  __a0
}

Activity

  1. added a commit that references this issue on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions