]> O.S.I.I.S - jp/crow.git/commitdiff
'this' keyword in compiled handler
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 18 Jan 2017 14:19:37 +0000 (15:19 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 18 Jan 2017 14:19:37 +0000 (15:19 +0100)
src/CompilerServices/CompilerServices.cs

index e0d6c1e0d31272a162afdde15693a5f0f96d22f5..e2c657cef7b022de2287893541e223332048f648 100644 (file)
@@ -667,6 +667,8 @@ namespace Crow
 
                                        il.Emit (OpCodes.Ldstr, strcst);
 
+                               }else if (string.Equals(rop,"this",StringComparison.OrdinalIgnoreCase)){
+                                       il.Emit (OpCodes.Ldarg_0);  //load sender ref onto the stack
                                } else {
                                        if (lopT.IsEnum)
                                                throw new NotImplementedException ();