Bug 23319 - Ternary Operator Fails in Mono 64 bit version (CS1525)
Summary: Ternary Operator Fails in Mono 64 bit version (CS1525)
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: 3.8.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
: 23339 23621 23746 23764 24555 ()
Depends on:
Blocks:
 
Reported: 2014-09-24 03:36 UTC by evolvedmicrobe
Modified: 2014-11-18 07:33 UTC (History)
7 users (show)

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


Attachments
Source file that generates error in 3.8.1 but not 3.8.0 (363 bytes, application/octet-stream)
2014-09-24 03:36 UTC, evolvedmicrobe
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 FIXED

Description evolvedmicrobe 2014-09-24 03:36:19 UTC
Created attachment 8166 [details]
Source file that generates error in 3.8.1 but not 3.8.0

I have code that works in MS .NET and in mono version 3.8.0, but fails to compile on mono 3.8.1 (64 bit, on mac OSX) when a ternary operator is used.   

In particular, a line like:

  var matchScore1 = ( 1 > 0 ) ? table[5, 1] : 0;
          
Causes the following error in the attached simple test case:

    test.cs(16,40): error CS1525: Unexpected symbol `?'
    test.cs(16,51): error CS1525: Unexpected symbol `1'


Note that there is no error in a 32 bit version on mac osx for 3.8.0, but there is in a 64 bit on mac osx for 3.8.1.  However, I don't think suspect the 32/64 bit difference matters here.
Comment 1 Marek Safar 2014-09-24 06:29:26 UTC
Fixed in master
Comment 2 Marek Safar 2014-09-25 03:30:02 UTC
*** Bug 23339 has been marked as a duplicate of this bug. ***
Comment 3 Marek Safar 2014-10-05 11:01:11 UTC
*** Bug 23621 has been marked as a duplicate of this bug. ***
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2014-10-06 15:18:14 UTC
Starting a tally of Desk cases in case we want to bring up this bug for hotfix consideration:
https://xamarin.desk.com/agent/case/92078
Comment 5 Marek Safar 2014-10-13 05:55:08 UTC
*** Bug 23764 has been marked as a duplicate of this bug. ***
Comment 6 Marek Safar 2014-10-13 05:56:25 UTC
*** Bug 23746 has been marked as a duplicate of this bug. ***
Comment 7 Marek Safar 2014-11-18 07:33:14 UTC
*** Bug 24555 has been marked as a duplicate of this bug. ***