Skip to content

Commit

Permalink
Merge #425
Browse files Browse the repository at this point in the history
425: Specify call resolution r=Dajamante a=Veykril

Closes #335

Co-authored-by: Lukas Wirth <[email protected]>
  • Loading branch information
bors-ferrocene[bot] and Veykril authored Aug 7, 2023
2 parents 96c347c + 7aa751e commit ff73e42
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
36 changes: 35 additions & 1 deletion src/entities-and-resolution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,8 @@ Resolution

:dp:`fls_ho4kem1slcxg`
:t:`Resolution` is the process of finding a unique interpretation for a
:t:`field access expression`, a :t:`method call expression`, or a :t:`path`.
:t:`field access expression`, a :t:`method call expression`, a :t:`call
expression` or a :t:`path`.

:dp:`fls_7le2vcdbtxbq`
A :t:`construct` that is being resolved is said to be :t:`under resolution`.
Expand Down Expand Up @@ -1354,6 +1355,39 @@ proceeds as follows:
:dp:`fls_jw2yv23cduu4`
A :t:`method call expression` shall resolve to exactly one :t:`method`.

.. _fls_TelBKNKodx3d:

Call Resolution
~~~~~~~~~~~~~~~

.. rubric:: Legality Rules

:dp:`fls_ZjJ7y9r6QQMW`
:t:`Call resolution` is a form of :t:`resolution` that applies to a
:t:`call expression`.

:dp:`fls_zBSloU2Gjv7x`
A :dt:`candidate callee type` is the :t:`type` of the :t:`call operand`
of a :t:`call expression` :t:`under resolution`.

:dp:`fls_XBakDylF7aOG`
A :dt:`candidate callee type chain` is a sequence of :t:`[candidate callee type]s`.
The :t:`candidate callee type chain` starts with the :t:`type` of the :t:`call
operand` of the:t:`call expression` :t:`under resolution`. From then on, the
:t:`candidate callee type chain` is treated as a :t:`dereference type chain`.

:dp:`fls_kzovwqIw7ghc`
:t:`Call resolution` of a :t:`call expression` proceeds as follows:

#. :dp:`fls_4iBdtE0Ji4Tf`
For each :t:`candidate callee type` of the
:t:`candidate callee type chain`

#. :dp:`fls_TWR5GIUxPcaJ`
If the :t:`candidate call type` is a :t:`callee type`, then the :t:`callee
type` of the :t:`call expression` is that :t:`candidate call type` and
:t:`call resolution` stops.

.. _fls_i6qzga6dyaee:

Path Resolution
Expand Down
3 changes: 3 additions & 0 deletions src/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3270,6 +3270,9 @@ The :t:`value` of a :t:`call expression` is determined as follows:
``argument_operand_tuple`` is a :t:`tuple` that wraps the
:t:`[argument operand]s`.

:dp:`fls_ZSkcro52q097`
A :t:`call expression` is subject to :t:`call resolution`.

.. rubric:: Dynamic Semantics

:dp:`fls_ggr5i91vur0r`
Expand Down

0 comments on commit ff73e42

Please sign in to comment.