mirror of
https://github.com/AlexMacocian/Sybil.git
synced 2026-07-25 08:22:11 +00:00
Fix empty body methods
This commit is contained in:
@@ -34,6 +34,8 @@ public sealed class TestClass<T> : BaseTestClass, IInterface where T : new(), cl
|
||||
this.fieldString = 0;
|
||||
return this.fieldString;
|
||||
}
|
||||
|
||||
public string GetSomething();
|
||||
}";
|
||||
|
||||
[TestMethod]
|
||||
@@ -95,7 +97,11 @@ public sealed class TestClass<T> : BaseTestClass, IInterface where T : new(), cl
|
||||
.WithTypeParameter(SyntaxBuilder.CreateTypeParameter("T"))
|
||||
.WithAttribute(SyntaxBuilder.CreateAttribute("SomeAttribute4")
|
||||
.WithArgument(0.5f))
|
||||
.WithBody("this.fieldString = 0;\r\nreturn this.fieldString;"))))
|
||||
.WithBody("this.fieldString = 0;\r\nreturn this.fieldString;"))
|
||||
.WithMethod(
|
||||
SyntaxBuilder.CreateMethod("string", "GetSomething")
|
||||
.WithModifier("public")
|
||||
.WithNoBody())))
|
||||
.Build();
|
||||
|
||||
var compilationUnit = compilationUnitSyntax.ToFullString();
|
||||
|
||||
@@ -169,6 +169,7 @@ namespace Sybil
|
||||
}
|
||||
|
||||
return this.MethodDeclarationSyntax
|
||||
.WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken))
|
||||
.NormalizeWhitespace();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Version>0.8.2</Version>
|
||||
<Version>0.8.3</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user