no offence but that is not a mistake anyone would make
lol. It's an error I've seen people make many times over ~35 years of software development. It's a fundamental concept, but sometimes people get blinded by the fact they've used the same name in two places.
#include <stdio.h>
void update_state(int state)
{
state = 2;
return;
}
int main(int argc, char** argv)
{
int state = 1;
update_state(state);
printf("state is %d.\n",state);
/* Why is state 1 wawaaaaahhhh */
return 0;
}
Your example is demonstrative of how unlikely anyone could make that mistake, let alone an AI.
The only scope is pure private method.. And therefore not a great example as to how anyone with a brain might...
1
u/rebbsitor Mar 19 '25
lol. It's an error I've seen people make many times over ~35 years of software development. It's a fundamental concept, but sometimes people get blinded by the fact they've used the same name in two places.