Skip to content

Commit 4c5d449

Browse files
Timur KelmanTimur Kelman
authored andcommitted
add a test
1 parent ccbd778 commit 4c5d449

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Tests/CSharp/MemberTests/MemberTests.cs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4019,6 +4019,58 @@ public static int StaticTestProperty
40194019
return _StaticTestProperty_sPrevPosition + 1;
40204020
}
40214021
}
4022+
}");
4023+
}
4024+
4025+
[Fact]
4026+
public async Task IndexedPropertyWithTriviaAsync()
4027+
{
4028+
//issue 1095
4029+
await TestConversionVisualBasicToCSharpAsync(
4030+
@"Class IndexedPropertyWithTrivia
4031+
'a
4032+
Property P(i As Integer) As Integer
4033+
'b
4034+
Get
4035+
'1
4036+
Dim x = 1 '2
4037+
'3
4038+
End Get
4039+
4040+
'c
4041+
Set(value As Integer)
4042+
'4
4043+
Dim x = 1 '5
4044+
'6
4045+
x = value + i '7
4046+
'8
4047+
End Set
4048+
'd
4049+
End Property
4050+
End Class", @"using System;
4051+
4052+
internal partial class IndexedPropertyWithTrivia
4053+
{
4054+
// a
4055+
public int get_P(int i)
4056+
// b
4057+
{
4058+
// 1
4059+
int x = 1; // 2
4060+
return default;
4061+
// 3
4062+
}
4063+
4064+
// c
4065+
public void set_P(int i, int value)
4066+
{
4067+
// 4
4068+
int x = 1; // 5
4069+
// 6
4070+
x = value + i; // 7
4071+
// 8
4072+
}
4073+
// d
40224074
}");
40234075
}
40244076
}

0 commit comments

Comments
 (0)