'a
Property P(i As Integer)
'b
Get
'1
Dim x = 1 '2
'3
End Get
'c
Set(value)
'4
Dim x = 1 '5
'6
x = value + i '7
'8
End Set
'd
End Property
Erroneous output
// a
// b
public void get_P(int i)
{
// 1
int x = 1; // 2
return default(object);
// 3
// c
// 4
// 6
// 8
// d
} // 5
// 7
public void set_P(int i, void value)
{
int x = 1;
x = Conversions.ToInteger(Operators.AddObject(value, i));
}
Expected output
// a
public void get_P(int i)
// b
{
// 1
int x = 1; // 2
return default(object);
// 3
}
// c
public void set_P(int i, void value)
{
// 4
int x = 1; // 5
// 6
x = Conversions.ToInteger(Operators.AddObject(value, i)); // 7
// 8
}
// d
This only affects trivia, so the code isn't actually broken, and as far as I can tell no comment is lost, but there is loss of information nonetheless: it's impossible to map the comments to the statements they belong to.
Details
Product in use: VS extension
Version in use: 5143c08297ae65cb7490ae768645f61131bf96be
Did you see it working in a previous version, which? no
VB.Net input code
Erroneous output
Expected output
This only affects trivia, so the code isn't actually broken, and as far as I can tell no comment is lost, but there is loss of information nonetheless: it's impossible to map the comments to the statements they belong to.
Details
Related issues coalesced
https://github.com/icsharpcode/CodeConverter/issues/1098