Skip to content

Fix implicit return assertions after statements#302

Open
szw9999 wants to merge 1 commit into
gajus:masterfrom
szw9999:codex-implicit-return-check
Open

Fix implicit return assertions after statements#302
szw9999 wants to merge 1 commit into
gajus:masterfrom
szw9999:codex-implicit-return-check

Conversation

@szw9999
Copy link
Copy Markdown

@szw9999 szw9999 commented May 26, 2026

Fixes #2.

Summary

  • Fix implicit return detection so non-empty annotated functions ending without return still receive a generated return assertion.
  • Add a regression fixture covering a function body with a statement and no explicit return.

Verification

  • git diff --check

I could not run the full Mocha suite locally because npm registry requests timed out while installing this legacy dependency tree in the available environment.

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.

Add assertions when implicitly returning from a function

1 participant