Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

False positive in "Convert to |= expression issue" #372

Closed
dgrunwald opened this issue Jan 19, 2014 · 1 comment
Closed

False positive in "Convert to |= expression issue" #372

dgrunwald opened this issue Jan 19, 2014 · 1 comment
Labels

Comments

@dgrunwald
Copy link
Member

                if (fileChangeWatcher != null)
                    fileChangeWatcher.Enabled = true;

The issue suggests to convert this to:

 fileChangeWatcher.Enabled |= fileChangeWatcher != null;

which would crash with a NullReferenceException.

@mkrueger
Copy link
Contributor

fixed

dgrunwald added a commit to icsharpcode/SharpDevelop that referenced this issue Jan 24, 2014
6837c57 Fix .NET 4.5 configuration.
0831ca2 Fix potential NullReferenceExceptions.
6d0ca7d Improved 'CS0618UsageOfObsoleteMemberIssue'.
cf1d410 Added CS0618UsageOfObsoleteMemberIssue.
15473ce Fixed Issue icsharpcode/NRefactory#372 'False positive in "Convert to |= expression issue"'.
e3d3917 Merge branch 'master' into erik-kallen-failing-test-mcs-16997
ba066e7 Updated mcs.
1d486ca Merge branch 'failing-test-mcs-16997' of github.com:erik-kallen/NRefactory into erik-kallen-failing-test-mcs-16997
bc83643 Merge pull request icsharpcode/NRefactory#369 from erik-kallen/anonymous-type-inherited-methods-bug
afec9f4 Remove implicit conversion from AstType to Expression.
570d0e1 CS0029InvalidConversionIssue: fields and local variables don't have a "return type", just a "type".
d9741f8 Swap actions in "The parameter '{0}' cannot be resolved" issue -- I think fixing an incorrect parameter name is the more common usecase.
d9121c4 Add ConvertSymbol() to TypeSystemAstBuilder and IAmbience.
ae68a95 Merge changes from SharpDevelop repository.
5487b2b Fixed null reference exception.
f1d2068 Fixed completion bug.
7d71b8f Fixed code completion bug.
f4fcc5d Fixed completion unit test.
284cfbf Fixed failing completion test.
6286e7c Also consider property getter/setter invocations in DoNotCallOverridableMethodsInConstructorIssue
4c5a047 added two failing code completion tests
571dd02 Fix CS0126 and CS0127 issues with async methods.
1240a5f Don't show "Field can be make readonly" for mutable structs
2cf57d9 Fixed bug in 'ExtractMethodAction'.
bfc6060 Fixed possible null reference in ConvertAnonymousDelegateToLambdaAction.
be458be Fixed bug in 'ConvertToAutoPropertyIssue'.
3552c47 Removed debug code.
13f8a1d Added indent support for the banner style.
d16dd0e Added indentation support for nextlineshifted 1&2 brace styles.
e867a35 Merge pull request icsharpcode/NRefactory#370 from mono-soc-2013/MateY-IndentEngine
e5db800 Small issue with scope.
e24561e Issue with continuation delta.
e0cfbd4 TestMethodContinuationCase3
fa6d1e1 Added failing method continuation test.
e4f8b23 Fixed formatting bug.
c5e3865 Fixed formatting bug.
7a187f1 Fixed a wrapping bug.
eed2858 Improved lambda parameter recognition.
9913aa2 Fixed bug in SegmentTrackingTokenWriter.
2a07aa9 Added test for the parser null ref exception.
ba1bdc7 Fixed bug invoking inherited methods (eg. ToString()) on anonymous types
578c9ae Fixed some issues in redundant unsafe context issue
67aada4 Failing test for https://bugzilla.xamarin.com/show_bug.cgi?id=16997
0f7b386 Fixed potential null reference exception in the C# parser.
3e88747 Fixed bug in ConvertToStaticTypeIssue
55ee1fd Fixed bug in format method recognition.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants