File 0614-Document-that-default-values-in-records-must-not-use.patch of Package erlang

From c35413a4c1e55a4b9382af262b11ae575491aeb1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Thu, 22 Feb 2024 12:10:16 +0100
Subject: [PATCH 1/2] Document that default values in records must not use
 variables

Closes #8166
---
 system/doc/reference_manual/ref_man_records.md | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/system/doc/reference_manual/records.xml b/system/doc/reference_manual/records.xml
index 8dece3e029..72206d2f35 100644
--- a/system/doc/reference_manual/records.xml
+++ b/system/doc/reference_manual/records.xml
@@ -47,9 +47,11 @@
       must be atoms. Each field can be given an optional default value.
       If no default value is supplied, <c>undefined</c> is used.</p>
     <pre>
--record(Name, {Field1 [= Value1],
+-record(Name, {Field1 [= Expr1],
                ...
-               FieldN [= ValueN]}).</pre>
+               FieldN [= ExprN]}).</pre>
+    <p>The default value for a field is an arbitrary expression, except that it must
+      not use any variables.</p>
     <p>A record definition can be placed anywhere among the attributes
       and function declarations of a module, but the definition must
       come before any usage of the record.</p>
-- 
2.35.3

openSUSE Build Service is sponsored by