-
Notifications
You must be signed in to change notification settings - Fork 264
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
Instrumentation appears to be breaking constants #153
Comments
Ah, interesting. Yes, that is deliberate, as functions declared as |
Should we stop supporting constant as a function modifier in 4.0? Looks deprecated in the docs, I.e doesn't appear as an option. |
It is described as an alias to view. It would also mean that we forced a requirement of Solidity |
Couldn't you simply not instrument
and
|
This wasn't a deliberate design decision, just something that we overlooked! I desperately want to keep instrumenting We do currently use a very simple regex, but extending it is non-trivial ("now we have two problems"). For example, the following is valid (if oddly formatted!) solidity:
|
That certainly is an edge-case kind of function |
@cgewecke Is there a reason we didn't do this with something like the following in the preprocessor?
|
If we run the preprocessor over everything instead of running the regex over everything, I see no reason why it wouldn't. |
Cool, I'll merge these changes into #151 |
done |
I have a library as follows
and normal tests of this run fine.
But when I run with
solidity-coverage
I get this errorSomehow the instrumentation process appears to have removed the
constant
keyword.The text was updated successfully, but these errors were encountered: