patch 8.2.4716: memory allocation failure not tested when defining a function

Problem:    Memory allocation failure not tested when defining a function.
Solution:   Add a test. (Yegappan Lakshmanan, closes #10127)
diff --git a/src/userfunc.c b/src/userfunc.c
index c80a490..7ad3388 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -1092,7 +1092,7 @@
 	}
 
 	// Add the line to the function.
-	if (ga_grow(newlines, 1 + sourcing_lnum_off) == FAIL)
+	if (ga_grow_id(newlines, 1 + sourcing_lnum_off, aid_get_func) == FAIL)
 	    goto theend;
 
 	if (heredoc_concat_len > 0)