Skip to content

Commit e616f0a

Browse files
committed
Add documentation to SIL.rst for convert_function to clarify escaping and not escaping types
1 parent 74ba135 commit e616f0a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/SIL.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4605,7 +4605,15 @@ in the following ways:
46054605
subclass of the source type's corresponding tuple element.
46064606

46074607
The function types may also differ in attributes, except that the
4608-
``convention`` attribute cannot be changed.
4608+
``convention`` attribute cannot be changed and the ``@noescape`` attribute must
4609+
not change for functions with context.
4610+
4611+
A ``convert_function`` cannot be used to change a thick type's ``@noescape``
4612+
attribute (``@noescape`` function types with context are not ABI compatible with
4613+
escaping function types with context) -- however, thin function types with and
4614+
without ``@noescape`` are ABI compatible because they have no context. To
4615+
convert from an escaping to a ``@noescape`` thick function type use
4616+
``convert_escape_to_noescape``.
46094617

46104618
convert_escape_to_noescape
46114619
```````````````````````````

0 commit comments

Comments
 (0)