Skip to content

Flag incorrect return statements in functions and subs#1463

Merged
TwitchBronBron merged 5 commits intomasterfrom
fix/catch-bad-return
Apr 22, 2025
Merged

Flag incorrect return statements in functions and subs#1463
TwitchBronBron merged 5 commits intomasterfrom
fix/catch-bad-return

Conversation

@TwitchBronBron
Copy link
Member

@TwitchBronBron TwitchBronBron commented Apr 17, 2025

void functions and subs may not have a return value. non-void functions and subs must have a return value. This PR adds the following features:

  • diagnostic when return a value from void functions or subs
  • diagnostic when missing a return value from non-void functions or subs
  • code action for deleting return value
  • code action for converting sub to function
  • code action for removing as void from function
  • code action for removing as <type> from sub

@TwitchBronBron TwitchBronBron merged commit d548848 into master Apr 22, 2025
8 of 11 checks passed
@TwitchBronBron TwitchBronBron deleted the fix/catch-bad-return branch April 22, 2025 14:21
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.

1 participant