Skip to content

Conversation

@cce
Copy link
Contributor

@cce cce commented Oct 17, 2025

This fixes Go vet warnings on 1.25 about code appearing after panic() calls.

Diffs of msgp_gen.go in algorand/go-algorand#6468 show the effect.

cce added a commit to cce/go-algorand that referenced this pull request Oct 18, 2025
@cce cce changed the title fix return after panic fix dead code appearing after panic Oct 18, 2025
@cce cce requested a review from Copilot October 20, 2025 14:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses Go vet warnings in version 1.25 by preventing dead code from appearing after panic() calls in generated code. The solution introduces a halt mechanism to track when a panic statement has been generated and prevents subsequent code generation.

  • Introduces a halted boolean flag to track when panic has been called
  • Adds a new panicf() helper method that sets the halt flag
  • Updates all code generation methods to check and respect the halt state

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cce cce merged commit b5ee9aa into master Oct 20, 2025
2 checks passed
@cce cce deleted the skip-unused-code-after-panic branch October 20, 2025 16:20
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.

4 participants