You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new lines between the properties is inconsistent and, in my opinion, is non ideal. From observation it seems that properties without an initializer get a single new line after them while properties which include an initializer get two new lines after them. This is most likely a bug in CSharpOutputVisitor.VisitPropertyDeclaration. It seems that replacing the call to Semicolon() here:
Input code
ICSharpCode.Decompiler.dll
coming from the latest preview release (9.0-preview2)Class:
DecompileRun
Erroneous output
The new lines between the properties is inconsistent and, in my opinion, is non ideal. From observation it seems that properties without an initializer get a single new line after them while properties which include an initializer get two new lines after them. This is most likely a bug in
CSharpOutputVisitor.VisitPropertyDeclaration
. It seems that replacing the call toSemicolon()
here:ILSpy/ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs
Line 2693 in 476e80b
with
WriteToken(Roles.Semicolon);
fixes the issue. This means that theSemicolon()
call unnecessarily inserts a new line in this case.Details
The text was updated successfully, but these errors were encountered: