Skip to content

Commit 236f724

Browse files
Timur KelmanTimur Kelman
authored andcommitted
add a test
1 parent e65b3fd commit 236f724

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Tests/CSharp/MemberTests/MemberTests.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,45 @@ public void set_Prop(int i, string value)
672672
}", incompatibleWithAutomatedCommentTesting: true);// Known bug: Additional declarations don't get comments correctly converted
673673
}
674674

675+
[Fact]
676+
public async Task StaticLocalsInPropertyGetterAndSetterAsync()
677+
{
678+
await TestConversionVisualBasicToCSharpAsync(
679+
@"
680+
Public Property Prop As String
681+
Get
682+
Static b As Boolean
683+
b = True
684+
End Get
685+
686+
Set(ByVal s As String)
687+
Static b As Boolean
688+
b = False
689+
End Set
690+
End Property
691+
", @"
692+
internal partial class SurroundingClass
693+
{
694+
private bool _Prop_b;
695+
private bool _Prop_b1;
696+
697+
public string Prop
698+
{
699+
get
700+
{
701+
_Prop_b = true;
702+
return default;
703+
}
704+
705+
set
706+
{
707+
_Prop_b1 = false;
708+
}
709+
}
710+
711+
}");
712+
}
713+
675714
[Fact]
676715
public async Task TestReadOnlyAndWriteOnlyParametrizedPropertyAsync()
677716
{

0 commit comments

Comments
 (0)