Skip to content

Commit 58c8191

Browse files
authored
use nameof (#109040)
1 parent 6cea093 commit 58c8191

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/tests/JIT/Regression/JitBlue/Runtime_54956/Runtime_54956.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static int TestEntryPoint()
4646
}
4747

4848
[MethodImpl(MethodImplOptions.NoInlining)]
49-
static bool Test(Action action, [CallerArgumentExpression("action")] string expr = null)
49+
static bool Test(Action action, [CallerArgumentExpression(nameof(action))] string expr = null)
5050
{
5151
try
5252
{

src/tests/nativeaot/SmokeTests/TrimmingBehaviors/Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
return success ? 100 : 1;
1414

15-
static bool RunTest(Func<int> t, [CallerArgumentExpression("t")] string name = null)
15+
static bool RunTest(Func<int> t, [CallerArgumentExpression(nameof(t))] string name = null)
1616
{
1717
Console.WriteLine($"===== Running test {name} =====");
1818
bool success = true;

src/tests/nativeaot/SmokeTests/UnitTests/Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
return success ? 100 : 1;
1616

17-
static bool RunTest(Func<int> t, [CallerArgumentExpression("t")] string name = null)
17+
static bool RunTest(Func<int> t, [CallerArgumentExpression(nameof(t))] string name = null)
1818
{
1919
Console.WriteLine($"===== Running test {name} =====");
2020
bool success = true;

0 commit comments

Comments
 (0)