diff options
author | Lukas Larsson <lukas@erlang.org> | 2022-10-12 16:22:39 +0200 |
---|---|---|
committer | Lukas Larsson <lukas@erlang.org> | 2022-10-12 16:22:39 +0200 |
commit | c8aff1ba53d7410f51b6588a6ecd3b2b287db423 (patch) | |
tree | 351e1b84b27dd473d137fcc5aa8ca5fb15aba12e /system/doc | |
parent | 5b279e38171637826501a6539ddc7fa01dc9b923 (diff) | |
parent | f65042e1164037d7f54fca4418cb8440a39ffdc4 (diff) | |
download | erlang-c8aff1ba53d7410f51b6588a6ecd3b2b287db423.tar.gz |
Merge branch 'maint'
Diffstat (limited to 'system/doc')
-rw-r--r-- | system/doc/reference_manual/typespec.xml | 8 |
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> |