r/programminghumor • • Mar 02 '26 • Bravo 1

Cursor would neverrr

Post image
2.3k Upvotes

155 comments sorted by

View all comments

Show parent comment

4

u/Elia_31 Mar 03 '26

If it's doing something with global variables?

13

u/coderman64 Mar 03 '26

No, the first return exits the function entirely, so the second will never be executed.

It's a basic mistake that most linters will warn you about.

2

u/FloydATC Mar 04 '26

Pff, just redefine "return". Easy.

There may be side-effects.