-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Member "toSlice" not found or not visible after argument-dependent lookup #1
Comments
Have you imported it and done |
Yes, I believe I did everything. Here is a complete contract which is failing:
|
That should work fine - and it works fine in Browser Solidity. If it's not working in your local solc, and it's up to date, I don't know what else could be wrong. Support for calling functions on string literals was added very recently - does |
Same thing
|
Again, there's nothing more I can do: This exact code works for me in Browser Solidity, and on the command line (in the unittests) with the latest version of solc. There must be something wrong with your solc installation, or it's not actually the version it claims to be; it's definitely not a problem with the library. Maybe ask in the solidity gitter channel? |
Actually, I don't even see how the functions could be visible outside of the library since they are marked as "internal" and the Solidity doc says "Those functions and state variables can only be accessed internally (i.e. from within the current contract or contracts deriving from it), without using this." |
Regarding the risk that "my" solc is not the right one: I used the repository "http://ppa.launchpad.net/ethereum/ethereum/ubuntu xenial main":
|
Solidity recently added support for 'internal' functions in libraries; they're automatically linked into the calling code. This whole library is predicated around that feature. Have you tried reproducing this in browser-solidity? The fact that it works there indicates it's not an issue with the library. |
You currently need the nightly version of solidity. We will release a new version 0.3.3 which will included that feature shortly. |
This is still failing in Browser Solidity (using 0.3.6), including pasting in some of the literal examples along with |
Can you give a complete example that fails in browser solidity, along with the error message you get? |
The error I got was exactly the same error that is in the title. |
Okay, here's an example: splitting a string into an array.
On the line containing |
And I'm using solidity version: 0.3.6-0d736fde/Release-Emscripten/clang |
That's a different issue; there was a bug in the example code ( |
That worked. Not sure exactly where the previous error appeared since it was a few days ago. |
Is there a way to specify the "using" statement without "*"? |
I cannot use the library. Even with your own example:
The compiler complains:
The text was updated successfully, but these errors were encountered: