Skip to content

Commit

Permalink
Update field references in property accessors (#108413)
Browse files Browse the repository at this point in the history
* Update field references in property accessors

* Update field references

* Use @

* Rename field

---------

Co-authored-by: Stephen Toub <[email protected]>
  • Loading branch information
cston and stephentoub authored Oct 3, 2024
1 parent b9ffdb0 commit f428917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/tools/illink/test/ILLink.Tasks.Tests/Mock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public MockDriver CreateDriver ()

public static string[] OptimizationNames {
get {
var field = typeof (ILLink).GetField ("_optimizationNames", BindingFlags.NonPublic | BindingFlags.Static);
return (string[]) field.GetValue (null);
var fieldInfo = typeof (ILLink).GetField ("_optimizationNames", BindingFlags.NonPublic | BindingFlags.Static);
return (string[]) fieldInfo.GetValue (null);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ static void TestIfElse (bool decision)
private class SimpleType
{
[Kept]
public static int field;
public static int fieldKept;

[Kept]
public int memberKept {
[Kept]
get { return field; }
get { return fieldKept; }
[Kept]
set { field = value; }
set { fieldKept = value; }
}

[Kept]
Expand Down Expand Up @@ -508,4 +508,4 @@ public static class PrefixLookupNestedType { }
private static class PrefixLookupPrivateNestedType { }
}
}
}
}

0 comments on commit f428917

Please sign in to comment.