From 806b0618b7133c8de0f19b384395df128d9e327e Mon Sep 17 00:00:00 2001 From: Haoyang Ma Date: Mon, 4 Nov 2024 17:24:51 +0000 Subject: [PATCH] refine specification to add rules about calldata in constructor --- docs/types/reference-types.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/types/reference-types.rst b/docs/types/reference-types.rst index a6c48d2416d9..806584e9704f 100644 --- a/docs/types/reference-types.rst +++ b/docs/types/reference-types.rst @@ -40,6 +40,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