Bug 14256 - incorrect suggestion to optimize LINQ (Source Analysis)
Summary: incorrect suggestion to optimize LINQ (Source Analysis)
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 4.0.12
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2013-08-26 22:48 UTC by Neal
Modified: 2013-08-27 00:47 UTC (History)
1 user (show)

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

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 Developer Community or GitHub 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:

Description Neal 2013-08-26 22:48:04 UTC
The suggestion is to simplify the == elements to use !

Such as:

var d = from item in SQLDatabase.Main.Table<FlightTable>()
						where item.IsSynced == false && item.Flown == true
						select item;

It suggests making it read !item.IsSynced

This is incorrect/non-compilable LINQ, I tried it and it failed
Comment 1 Mike Krüger 2013-08-27 00:47:14 UTC
should work in newer versions.