patch 7.4.2137
Problem: Using function() with a name will find another function when it is
redefined.
Solution: Add funcref(). Refer to lambda using a partial. Fix several
reference counting issues.
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 062f822..4f916b7 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -6310,7 +6310,7 @@
if (tv->vval.v_partial->pt_dict != NULL)
tv->vval.v_partial->pt_dict->dv_refcount++;
return NEW_FUNCTION(tv->vval.v_partial == NULL
- ? (char_u *)"" : tv->vval.v_partial->pt_name,
+ ? (char_u *)"" : partial_name(tv->vval.v_partial),
tv->vval.v_partial->pt_argc, argv,
tv->vval.v_partial->pt_dict,
tv->vval.v_partial->pt_auto);