handzlikchris / handzlikchris/FastScriptReload
The BuilderPatternFunctionsRewriter class has some incorrect handling methods.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
orgin code is:
` private static ClassA staicField;
public static ClassA GetStaicField()
{
return staicField;
}`
will be written to
` private static ClassA staicField;
public static ClassA_Patched_0 GetStaicField()
{
return staicField;
}`
The above code may lead to type mismatch errors.
Only "return this" needs to be rewrite. Perhaps it is necessary to add a check for whether there is a "return this".
static bool ReturnsThis(MethodDeclarationSyntax method)
{
var returnStatements = method.DescendantNodes().OfType();
return returnStatements.All(r => r.Expression is ThisExpressionSyntax);
}
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.