Version Used: C# 13 / SDK 9.0.200
Steps to Reproduce:
- New C# console app project
- Program.cs
for(int a=0,b,c;;);
- Build yields "Program.cs(1,12): CS1002 : ; expected" along with other related errors. Did not appear as error by IDE (VS or Rider).
Diagnostic Id: CS1002 : ; expected
Expected Behavior: should be able to mix declarations and assignments in initialization clause in 'for' statement
Actual Behavior: compilation errors - seems like if you include any assignments, then only the last variable is allowed to be declaration only.
RoslynBug20250215.zip