handzlikchris / handzlikchris/FastScriptReload
The BuilderPatternFunctionsRewriter class has some incorrect handling methods.
- Vorherrschende Sprache
- C#
- Sterne
- 2.2k
- Forks
- 167
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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);
}
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.