-
Notifications
You must be signed in to change notification settings - Fork 233
VB -> C#: Simple boolean eval function breaks on dynamic storage object #782
Copy link
Copy link
Closed
Labels
VB -> C#Specific to VB -> C# conversionSpecific to VB -> C# conversioncompilation errorA bug where the converted output won't compileA bug where the converted output won't compile
Description
VB.Net input code
Public Function IsHybridApp() As Boolean
Return Application.Session("hybrid") IsNot Nothing AndAlso Application.Session("hybrid") = 1
End FunctionErroneous output
public static bool IsHybridApp()
{
return Conversions.ToBoolean((object)(Application.Session.hybrid is object) && Operators.ConditionalCompareObjectEqual(Application.Session.hybrid, 1, false));
}Expected output
public static bool IsHybridApp()
{
return Application.Session.hybrid != null && Application.Session.hybrid == 1;
}Details
CC 8.41
Application.Session definition is
//
// Summary:
// Provides a generic storage for session-based objects.
public static dynamic Session { get; }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
VB -> C#Specific to VB -> C# conversionSpecific to VB -> C# conversioncompilation errorA bug where the converted output won't compileA bug where the converted output won't compile