Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor Change
  • Loading branch information
rcosta358 committed Apr 1, 2026
commit 0f47626825f39aa0a1522ae66f1a6fe445739cf8
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

public class VariableResolver {

private static final String RET_PREFIX = "#ret_";
private static final String FRESH_PREFIX = "#fresh_";

/**
* Extracts variables with constant values from an expression
*
Expand Down Expand Up @@ -161,10 +158,10 @@ private static int getCounter(Var var) {
}

private static boolean isReturnVar(Var var) {
return var.getName().startsWith(RET_PREFIX);
return var.getName().startsWith("#ret_");
}

private static boolean isFreshVar(Var var) {
return var.getName().startsWith(FRESH_PREFIX);
return var.getName().startsWith("#fresh_");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could these be dependent on the final strings where we define the format for fresh and ret instead of hard coded?

Copy link
Copy Markdown
Collaborator Author

@rcosta358 rcosta358 Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically yeah, but not cleanly, since the formats are #ret_%d and #fresh_%d and we only want the prefixes. It would only work with regexes, not string formats.

}
}
Loading