VSC gives 2 errors instead of 1

Hello everyone, I was following the lecture and got to the point where we were asked to intentionally simulate a syntax error. Therefore, I have deleted the closing parenthesis in Line 12. However, after compiling again, I noticed that my “Problems” section in VSC showed 2 errors instead of 1 but appeared to be the same.

My question is the following: Is this normal behaviour? Is there a technical reason why this would happen? Are there any differences between the two errors?

I am aware that it is not really a substantial problem and both errors promptly disappeared after reintroducing the parenthesis and recompiling, however I am genuinely curious to know what the difference between the two errors is.

Screenshot taken on VSC version 1.85.0 (Universal) on macOS Sonoma 14

If I had to make a guess as to why there’s 2, it would be because VSCode is using one compiling for intellisense and building the project uses a different one. I don’t know enough about the process on MacOS to know if this is normal behaviour, though.

Either way, I wouldn’t worry about it for now.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms