Skip to content

Commit a97672a

Browse files
Closure: Mention non-serializability of Closure objects (#5363)
* Mention non-serializability of Closure objects Co-authored-by: Jordi Kroon <jordi@jordikroon.nl>
1 parent 2c357a0 commit a97672a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

language/predefined/closure.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@
7676
</informaltable>
7777
</section>
7878

79+
<section role="notes">
80+
&reftitle.notes;
81+
<note>
82+
<simpara>
83+
<classname>Closure</classname> objects cannot be serialized
84+
as closures may contain bound variables and a specific execution context.
85+
Attempting to serialize a closure will throw an <exceptionname>Exception</exceptionname>.
86+
</simpara>
87+
</note>
88+
</section>
89+
7990
</partintro>
8091

8192
&language.predefined.closure.construct;

0 commit comments

Comments
 (0)