Skip to content

Compilation fails spuriously until I retype semicolon #2879

@carotechsolutions

Description

@carotechsolutions

Describe the problem

Same thing has happened to me a few times this week.

I have a semi colon at the end of my line but I get this error with the line number:

error: expected ';' before '}' token

I go to the line above that curly bracket, which does have a semicolon, and I erase the semicolon and retype it and it compiles.

The last time it happened, I compiled 3 times in a row without changing anything and it still error'd so I don't think it ran the code before autosave completed.

To reproduce

Just happens randomly.

I tried erasing the semicolon, typing it again and hitting CTRL+SHIFT+U to compile and upload really fast and beat the autosave but seems like it saves before compile anyway.

Expected behavior

No error when there is a semicolon at the end of the line

Arduino IDE version

2.3.8

Operating system

Windows

Operating system version

Windows 11

Additional context

I didn't verify on nightly build because I can't reproduce it.

Related

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions