File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
src/Castle.Core/DynamicProxy/Generators/Emitters/SimpleAST Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -21,33 +21,19 @@ namespace Castle.DynamicProxy.Generators.Emitters.SimpleAST
2121 internal class ReturnStatement : IStatement
2222 {
2323 private readonly IExpression ? expression ;
24- private readonly Reference ? reference ;
2524
2625 public ReturnStatement ( )
2726 {
2827 }
2928
30- public ReturnStatement ( Reference reference )
31- {
32- this . reference = reference ;
33- }
34-
3529 public ReturnStatement ( IExpression expression )
3630 {
3731 this . expression = expression ;
3832 }
3933
4034 public void Emit ( ILGenerator gen )
4135 {
42- if ( reference != null )
43- {
44- reference . Emit ( gen ) ;
45- }
46- else if ( expression != null )
47- {
48- expression . Emit ( gen ) ;
49- }
50-
36+ expression ? . Emit ( gen ) ;
5137 gen . Emit ( OpCodes . Ret ) ;
5238 }
5339 }
You can’t perform that action at this time.
0 commit comments