Skip to content

Commit ae7377e

Browse files
cstonstephentoub
authored andcommitted
Update field references in property accessors (dotnet#108413)
* Update field references in property accessors * Update field references * Use @ * Rename field --------- Co-authored-by: Stephen Toub <[email protected]>
1 parent e247b48 commit ae7377e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/tools/illink/test/ILLink.Tasks.Tests/Mock.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public MockDriver CreateDriver ()
3737

3838
public static string[] OptimizationNames {
3939
get {
40-
var field = typeof (ILLink).GetField ("_optimizationNames", BindingFlags.NonPublic | BindingFlags.Static);
41-
return (string[]) field.GetValue (null);
40+
var fieldInfo = typeof (ILLink).GetField ("_optimizationNames", BindingFlags.NonPublic | BindingFlags.Static);
41+
return (string[]) fieldInfo.GetValue (null);
4242
}
4343
}
4444

src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/MemberUsedViaReflection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ static void TestIfElse (bool decision)
139139
private class SimpleType
140140
{
141141
[Kept]
142-
public static int field;
142+
public static int fieldKept;
143143

144144
[Kept]
145145
public int memberKept {
146146
[Kept]
147-
get { return field; }
147+
get { return fieldKept; }
148148
[Kept]
149-
set { field = value; }
149+
set { fieldKept = value; }
150150
}
151151

152152
[Kept]
@@ -508,4 +508,4 @@ public static class PrefixLookupNestedType { }
508508
private static class PrefixLookupPrivateNestedType { }
509509
}
510510
}
511-
}
511+
}

0 commit comments

Comments
 (0)