Skip to content

Commit

Permalink
refine specification to add rules about calldata in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
haoyang9804 authored and cameel committed Nov 29, 2024
1 parent 0b01a8a commit 515ad36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/types/reference-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ non-persistent area where function arguments are stored, and behaves mostly like
``memory`` or ``storage`` in internal and private ones.
Now ``memory`` and ``calldata`` are allowed in all functions regardless of their visibility.

.. note::
Constructor parameters cannot use ``calldata`` as their data location.

.. note::
Prior to version 0.5.0 the data location could be omitted, and would default to different locations
depending on the kind of variable, function type, etc., but all complex types must now give an explicit
Expand Down

0 comments on commit 515ad36

Please sign in to comment.