We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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<ReturnStatementSyntax>(); return returnStatements.All(r => r.Expression is ThisExpressionSyntax); }
The text was updated successfully, but these errors were encountered:
Thanks - I'll try to have a look, btw if you already have a fix ready it'd be great to have that as PR.
I think rewritter you want is here FastScriptReload.Editor.Compilation.CodeRewriting.BuilderPatternFunctionsRewriter.BuilderPatternFunctionsRewriter
FastScriptReload.Editor.Compilation.CodeRewriting.BuilderPatternFunctionsRewriter.BuilderPatternFunctionsRewriter
Sorry, something went wrong.
No branches or pull requests
orgin code is:
` private static ClassA staicField;
will be written to
` private static ClassA 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".
The text was updated successfully, but these errors were encountered: