diff --git a/Tests/CSharp/MemberTests/MemberTests.cs b/Tests/CSharp/MemberTests/MemberTests.cs index af4fb542..a89c41bf 100644 --- a/Tests/CSharp/MemberTests/MemberTests.cs +++ b/Tests/CSharp/MemberTests/MemberTests.cs @@ -4019,6 +4019,58 @@ public static int StaticTestProperty return _StaticTestProperty_sPrevPosition + 1; } } +}"); + } + + [Fact] + public async Task IndexedPropertyWithTriviaAsync() + { + //issue 1095 + await TestConversionVisualBasicToCSharpAsync( + @"Class IndexedPropertyWithTrivia + 'a + Property P(i As Integer) As Integer + 'b + Get + '1 + Dim x = 1 '2 + '3 + End Get + + 'c + Set(value As Integer) + '4 + Dim x = 1 '5 + '6 + x = value + i '7 + '8 + End Set + 'd + End Property +End Class", @"using System; + +internal partial class IndexedPropertyWithTrivia +{ + // a + public int get_P(int i) + // b + { + // 1 + int x = 1; // 2 + return default; + // 3 + } + + // c + public void set_P(int i, int value) + { + // 4 + int x = 1; // 5 + // 6 + x = value + i; // 7 + // 8 + } + // d }"); } } \ No newline at end of file