From bb122e4021970b416dccf5fdbd6b2c0dd478f30e Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 16 Nov 2023 13:53:46 +0100 Subject: [PATCH] Specify no binding collisions being allowed in fn param lists --- src/expressions.rst | 3 +++ src/functions.rst | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/expressions.rst b/src/expressions.rst index 5d2a498c..aa4ef8b6 100644 --- a/src/expressions.rst +++ b/src/expressions.rst @@ -3587,6 +3587,9 @@ site of a :t:`call expression` or a :t:`method call expression`. The :t:`pattern` of a :t:`closure parameter` shall be an :t:`irrefutable pattern`. +:dp:`fls_qPeOL6ZhXsgH` +The :t:`[binding]s` of all :t:`[pattern]s` of all :t:`[closure parameter]s` of a :t:`closure expression` shall not shadow another. + :dp:`fls_yn30xuejcfxo` The :t:`type` of a :t:`closure expression` is the unique anonymous :t:`closure type` defined by it. diff --git a/src/functions.rst b/src/functions.rst index 9b42c716..c9345105 100644 --- a/src/functions.rst +++ b/src/functions.rst @@ -83,6 +83,9 @@ it is an :t:`external function`. The :t:`pattern` of a :t:`function parameter` shall be an :t:`irrefutable pattern`. +:dp:`fls_PGDKWK7nPvgw` +The :t:`[binding]s` of all :t:`[pattern]s` of all :t:`[function parameter]s` of a :t:`function` shall not shadow another. + :dp:`fls_vljy4mm0zca2` A :t:`return type` is the :t:`type` of the result a :t:`function` returns. @@ -183,4 +186,3 @@ program. A :t:`main function` is subject to the following restrictions: } fn main() {} -