Red Gate forums :: View topic - null coalescing operator - Reflector's bug?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
.Net Reflector 6.x and .NET Reflector 6.x Pro
.Net Reflector 6.x and .NET Reflector 6.x Pro forum

null coalescing operator - Reflector's bug?

Search in .Net Reflector 6.x and .NET Reflector 6.x Pro forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
chaleks



Joined: 27 Nov 2010
Posts: 1

PostPosted: Sat Nov 27, 2010 5:50 pm    Post subject: null coalescing operator - Reflector's bug? Reply with quote

I have encountered the following issue.
http://stackoverflow.com/questions/4292142/c-compiling-optimizations-null-coalescing-operator-updated-reflectors-bug

C# Code:
===============
Code:
private static string host; 
public static string Host 
{       
    get 
    { 
        return host ?? (host= (ConfigurationManager.AppSettings["Host"] ?? "host.ru")); 
    } 
}

===============
Reflector's output:
===============
Code:
public static string Host

    get 
    { 
        if (Helper.host == null) 
        { 
            string host = Helper.host; 
        } 
        return (Helper.host = ConfigurationManager.AppSettings["Host"] ?? "host.ru"); 
    } 
}


Those pieces of code mean different logics. Is this a bug?
Back to top
View user's profile Send private message
Clive Tong



Joined: 04 Dec 2008
Posts: 283

PostPosted: Mon Nov 29, 2010 10:38 am    Post subject: Reply with quote

Thanks for reporting this. I've logged it as issue RP-779. and will investigate it further.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group