Skip to content

Commit

Permalink
Update spec with more details from chapel-lang#19306
Browse files Browse the repository at this point in the history
---
Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
  • Loading branch information
mppf committed Jun 17, 2022
1 parent d8c48ef commit 0136ba0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions doc/rst/language/spec/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ the current one and the name of the module itself (``M`` in the example)
available in a second scope just outside of that. In contrast, ``import``
as well as ``public use`` do not use these implicit scopes.

Also, note that ``public use`` statements do not enable qualified access
by default (see :ref:`Public_Use`).

.. _Use_And_Import_Conflicts:

Conflicts
Expand Down Expand Up @@ -566,6 +569,11 @@ they were defined in the scope with the use. This strategy is called
`re-exporting`. More information about re-exporting can be found in the
relevant section (:ref:`Reexporting`).

Lastly, by default, ``public use`` does not enable qualified access. For
example, ``public use M`` brings in the contents of module ``M`` but not
the name ``M`` itself. However the ``as`` syntax can be used to opt in to
bringing in the module name to enable qualified access: ``public use M as M``.

.. _Limitation_Clauses:

Except and Only Lists
Expand Down
8 changes: 4 additions & 4 deletions doc/rst/language/spec/procedures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1391,11 +1391,11 @@ function is determined by the first of the following steps that applies:
corresponding legal argument mapping to :math:`Y`, then :math:`Y`
is more specific.

- If :math:`X` shadows :math:`Y`, then :math:`X` is more
specific.
- If neither :math:`X` nor :math:`Y` are methods, and :math:`X` shadows
:math:`Y`, then :math:`X` is more specific.

- If :math:`Y` shadows :math:`X`, then :math:`Y` is more
specific.
- If neither :math:`X` nor :math:`Y` are methods, and :math:`Y` shadows
:math:`X`, then :math:`Y` is more specific.

- If at least one of the legal argument mappings to :math:`X` is
*weak preferred* and none of the legal argument mappings to
Expand Down

0 comments on commit 0136ba0

Please sign in to comment.