hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.23k stars 206 forks source link

Update library documentation for clarity and correctness #1566

Closed 0xDecentralizer closed 9 months ago

0xDecentralizer commented 9 months ago

This Pull Request enhances the clarity and correctness of the documentation regarding libraries in Solidity. It addresses the restrictions applied to libraries, emphasizing their inability to modify the state and the necessity of using "view" or "pure" functions. These changes aim to provide more accurate guidance to users of the documentation.

0xDecentralizer commented 9 months ago

I don't know that this is true.

library L {
  function foo(int[2] storage a) internal {
      a[0] = 1;
      a[1] = 2;
  }
}

solc also allow this. Am I missing something?

yes yes I apologize for my mistake