Skip to content

Commit

Permalink
update to evolution
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Sep 22, 2023
1 parent 646c11f commit 50dbfb4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/rst/language/evolution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@ In version 1.32, arrays and records now always have a default intent of
``const``. This means that if arrays and records are modified inside of a
function, a ``coforall``, a ``begin``, or ``cobegin``, they must use a ``ref``
intent. This also means that record methods which modify their implicit
``this`` argument must also use a ``ref`` intent. ``forall`` is a current
exception and will not warn by default. Previously, the compiler would treat
``this`` argument must also use a ``ref`` intent. Previously, the compiler would treat
these types as either ``const ref`` intent or ``ref`` intent, depending on if
they were modified. This change was motivated by improving the consistency
across types and making potential problems more apparent.

Since there is a lot of user code relying on modifying an outer array, the
corresponding change for ``forall`` is still under discussion. As a result, it
will not warn by default, but modifying an outer array from a ``forall`` might
not be allowed in the future in some or all cases.

Consider the following code segment, which contains a ``coforall`` statement
which modifies local variables. Prior to version 1.32, this code compiled and
worked without warning.
Expand Down

0 comments on commit 50dbfb4

Please sign in to comment.