summaryrefslogtreecommitdiff
path: root/system/doc
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang.org>2022-10-12 16:22:39 +0200
committerLukas Larsson <lukas@erlang.org>2022-10-12 16:22:39 +0200
commitc8aff1ba53d7410f51b6588a6ecd3b2b287db423 (patch)
tree351e1b84b27dd473d137fcc5aa8ca5fb15aba12e /system/doc
parent5b279e38171637826501a6539ddc7fa01dc9b923 (diff)
parentf65042e1164037d7f54fca4418cb8440a39ffdc4 (diff)
downloaderlang-c8aff1ba53d7410f51b6588a6ecd3b2b287db423.tar.gz
Merge branch 'maint'
Diffstat (limited to 'system/doc')
-rw-r--r--system/doc/reference_manual/typespec.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml
index dbe97237ec..fbcc3315a7 100644
--- a/system/doc/reference_manual/typespec.xml
+++ b/system/doc/reference_manual/typespec.xml
@@ -629,5 +629,13 @@
of the following form:
</p>
<pre> -spec my_error(term()) -> no_return().</pre>
+
+ <note>
+ <p>Erlang uses the shorthand version <c>_</c> as an anonymous type variable
+ equivalent to <c>term()</c> or <c>any()</c>. For example, the following function</p>
+ <pre> -spec Function(string(), _) -> string().</pre>
+ <p>is equivalent to:</p>
+ <pre> -spec Function(string(), any()) -> string().</pre>
+ </note>
</section>
</chapter>