diff --git a/Tests/CSharp/ExpressionTests/ExpressionTests.cs b/Tests/CSharp/ExpressionTests/ExpressionTests.cs index 4e767005..b6875deb 100644 --- a/Tests/CSharp/ExpressionTests/ExpressionTests.cs +++ b/Tests/CSharp/ExpressionTests/ExpressionTests.cs @@ -107,6 +107,25 @@ public void S() }"); } + [Fact] + public async Task DynamicBoolAsync() + { + await TestConversionVisualBasicToCSharpAsync(@" +Public Class C + Public Function IsHybridApp() As Boolean + Return New Object().Session(""hybrid"") IsNot Nothing AndAlso New Object().Session(""hybrid"") = 1 + End Function +End Class", @"using Microsoft.VisualBasic.CompilerServices; // Install-Package Microsoft.VisualBasic + +public partial class C +{ + public bool IsHybridApp() + { + return Conversions.ToBoolean(((dynamic)new object()).Session(""hybrid"") is not null && Operators.ConditionalCompareObjectEqual(((dynamic)new object()).Session(""hybrid""), 1, false)); + } +}"); + } + [Fact] public async Task ConversionOfNotUsesParensIfNeededAsync() {