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
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- Addressables Profiles and Analyze windows no minimum window size
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
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).