From c2e6452b90e3db39111f052a9dfb513aed14b135 Mon Sep 17 00:00:00 2001 From: wechman Date: Wed, 10 Aug 2022 10:42:02 +0200 Subject: [PATCH] using-for.rst: Clarify which library functions can be used with `using for` --- docs/contracts/using-for.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/contracts/using-for.rst b/docs/contracts/using-for.rst index 3e9e1522e..7ca58771d 100644 --- a/docs/contracts/using-for.rst +++ b/docs/contracts/using-for.rst @@ -16,10 +16,11 @@ at contract level. The first part, ``A``, can be one of: -- a list of file-level or library functions (``using {f, g, h, L.t} for uint;``) - - only those functions will be attached to the type as member functions -- the name of a library (``using L for uint;``) - - all functions (both public and internal ones) of the library are attached to the type. +- A list of file-level or library functions (``using {f, g, h, L.t} for uint;``) - + only those functions will be attached to the type as member functions. + Note that private library functions can only be specified when ``using for`` is inside the library. +- The name of a library (``using L for uint;``) - + all non-private functions of the library are attached to the type. At file level, the second part, ``B``, has to be an explicit type (without data location specifier). Inside contracts, you can also use ``using L for *;``,