Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.3.0b6
Issue ID
964123
Regression
No
"CS1525: Unexpected symbol" error when user passes multiple logical comparisons as boolean parameters
"CS1525: Unexpected symbol" error when user passes multiple logical comparisons as boolean parameters and comparison contains ">" while previous comparison contains "<" ( for example: ( a < b, a > b ), (a > b, b < a, b > a))
Reproduction steps:
1. Open Unity and create a new project
2. Right-click in the Project Window and select Import New Asset...
3. Import "MyClass.cs" script
4. 5 errors appear in the console Window
Expected result: Code compiled with no errors
Actual result: An error "error CS1525: Unexpected symbol" is produced
Reproducible with: 5.4.4f1, 5.5.0a6, 5.6.3f1, 2017.2.0f1, 2017.3.0b6, 2018.1.0a1, 2018.1.0a2
Notes: No issue when the first comparison contains ">", while any of the following contain "<"
The error appears both in Unity console and ModoDevelop but not in Visual Studio
Workaround: if the logical comparison statements are put into brackets ((a < b), (a > b)) no error is produced
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- VFX appears white and lacks color in Preview window when created and observed in HDRP project
- “There is no data available for the selected frame.” appears in the Timeline section after closing Target Frame Time dropdown
- Unity Version Control window opens when right-clicking the icon on the main toolbar
- [Android] Native Crash on TilemapRendererJobs
- Character text is not bold in the title of GameObjects in the Inspector when naming using specific language characters
Resolution Note:
This is a known issue with the mono C# compiler (mcs). It is unlikely to be fixed before we migrate to the Microsoft C# compiler (Roslyn/csc).