You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was partly intentional. Libraries are seen as implicit base contracts. Since external functions are not visible in derived contracts, external functions cannot be called like that.
Do we want to change that?
In the end, the analogy does not go that far anyway, since calling a function of a base contract will not perform copies in memory while copies are always performed when calling library functions, so basically we do perform an external function call, and thus external functions should also be visible.
This was partly intentional. Libraries are seen as implicit base contracts. Since external functions are not visible in derived contracts, external functions cannot be called like that.
I think we should just clean the inheritance rules, for libraries too. I'd consider actually prefer going back to the original proposals you didn't like when libraries were introduced: separating the visibility and the inlining aspect of internal. The visibility shows what are internal to the library implementation and what aren't, while inlining just shows inlining. In that sense onlyexternal ones would be visible by contracts using libraries.
The text was updated successfully, but these errors were encountered: