Skip to content

Commit c3b95f3

Browse files
committed
AsTypeExpression can operate on expressions
1 parent e677ee0 commit c3b95f3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST/AsTypeExpression.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
2020
using System.Diagnostics;
2121
using System.Reflection.Emit;
2222

23-
[DebuggerDisplay("{reference} as {type}")]
23+
[DebuggerDisplay("{expression} as {type}")]
2424
internal class AsTypeExpression : IExpression
2525
{
26-
private readonly Reference reference;
26+
private readonly IExpression expression;
2727
private readonly Type type;
2828

29-
public AsTypeExpression(Reference reference, Type type)
29+
public AsTypeExpression(IExpression expression, Type type)
3030
{
31-
this.reference = reference;
31+
this.expression = expression;
3232
this.type = type;
3333
}
3434

3535
public void Emit(ILGenerator gen)
3636
{
37-
reference.Emit(gen);
37+
expression.Emit(gen);
3838
gen.Emit(OpCodes.Isinst, type);
3939
}
4040
}

0 commit comments

Comments
 (0)