Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify no binding collisions being allowed in fn param lists #473

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion src/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -183,4 +186,3 @@ program. A :t:`main function` is subject to the following restrictions:
}

fn main() {}