From e7ae984e3686aa5376f93afec11c355843bf3894 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 3 Jan 2025 08:14:47 +0100 Subject: [PATCH] Add a note on the types locality --- doc/tags/types.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/tags/types.rst b/doc/tags/types.rst index 86e5dc8d5..a2924802f 100644 --- a/doc/tags/types.rst +++ b/doc/tags/types.rst @@ -8,6 +8,13 @@ The ``types`` tag declares the types of template variables. +.. note:: + + The types declared in a template are local to that template and must not be + propagated to included templates. This is because a template can be + included from multiple different places, each potentially having different + variable types. + To do this, specify a :ref:`mapping ` of names to their types as strings.