blob: 24c56f00d68c264ffd939c80aa9fcf2b91fe377e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using System.Linq.Expressions;
using System;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
namespace Mono.Linker.Tests.Cases.Reflection
{
[Reference ("System.Core.dll")]
public class ExpressionCallStringAndLocals
{
public static void Main ()
{
Branch_SystemTypeValueNode_KnownStringValue ();
}
[Kept]
private static int OnlyCalledViaExpression ()
{
return 42;
}
[Kept]
static void Branch_SystemTypeValueNode_KnownStringValue ()
{
var t1 = typeof (ExpressionCallStringAndLocals);
var t2 = t1;
var expr = Expression.Call (t2, "OnlyCalledViaExpression", Type.EmptyTypes);
Console.WriteLine (expr.Method);
}
}
}
|