mirror of
https://github.com/AlexMacocian/Sybil.git
synced 2026-07-15 15:19:59 +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();
|
||||
|
||||
Reference in New Issue
Block a user