Skip to content

@trace if return nothing in branches #1311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 12, 2025
Merged

@trace if return nothing in branches #1311

merged 11 commits into from
Jun 12, 2025

Conversation

jumerckx
Copy link
Collaborator

@jumerckx jumerckx commented May 22, 2025

if the value if the result value in an if-statement is not required.
This is assuming use of the trace macro adheres to the docs:

  Currently Supported
  ===================

    •  if conditions (with elseif and other niceties) (@trace if ...)

    •  if statements with a preceeding assignment (@trace a = if ...) (note the positioning of the macro needs to be before the assignment and not before the if)

Also fixes #1312

@jumerckx jumerckx marked this pull request as draft May 22, 2025 13:28
jumerckx and others added 4 commits May 26, 2025 16:53
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@jumerckx jumerckx marked this pull request as ready for review May 26, 2025 14:54
@jumerckx jumerckx requested a review from wsmoses May 26, 2025 14:56
@wsmoses wsmoses requested a review from Pangoraw June 11, 2025 15:11
@wsmoses
Copy link
Member

wsmoses commented Jun 11, 2025

@Pangoraw can you give this a final review (otherwise lgtm)

Copy link
Collaborator

@Pangoraw Pangoraw left a comment

Choose a reason for hiding this comment

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

Looks good!

@Pangoraw Pangoraw merged commit ddb03bf into main Jun 12, 2025
55 of 56 checks passed
@Pangoraw Pangoraw deleted the jm/ifnoreturn branch June 12, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mutating value in traced if is buggy
3 participants