Bug 60471 - Compiler Error "Unexpected symbol" with > or < operators
Summary: Compiler Error "Unexpected symbol" with > or < operators
Status: RESOLVED DUPLICATE of bug 6292
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: 5.4 (2017-06)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2017-11-01 12:32 UTC by Jonathan Chambers
Modified: 2017-11-01 14:30 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test Case (1.14 KB, application/octet-stream)
2017-11-01 12:32 UTC, Jonathan Chambers
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 6292

Description Jonathan Chambers 2017-11-01 12:32:51 UTC
Created attachment 25530 [details]
Test Case

Run attached example. mcs has errors where csc does not

csc MyClass.cs -t:library
Microsoft (R) Visual C# Compiler version 2.3.1.61919 (57c81319)
Copyright (C) Microsoft Corporation. All rights reserved.

MyClass.cs(12,30): warning CS1718: Comparison made to same variable; did you mean to compare something else?
MyClass.cs(16,29): warning CS1718: Comparison made to same variable; did you mean to compare something else?
MyClass.cs(20,23): warning CS1718: Comparison made to same variable; did you mean to compare something else?
MyClass.cs(11,9): warning CS0162: Unreachable code detected

mcs MyClass.cs -t:library
MyClass.cs(10,33): error CS1525: Unexpected symbol `b'
MyClass.cs(11,33): error CS1525: Unexpected symbol `c'
MyClass.cs(12,33): error CS1525: Unexpected symbol `a'
MyClass.cs(13,32): error CS1525: Unexpected symbol `a'
MyClass.cs(14,33): error CS1525: Unexpected symbol `a'
Compilation failed: 5 error(s), 0 warnings
Comment 1 Marek Safar 2017-11-01 14:30:35 UTC

*** This bug has been marked as a duplicate of bug 6292 ***