-
Notifications
You must be signed in to change notification settings - Fork 53
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
Solidity hex""
should be represented as bytes
, not bytes1
#39
Comments
Actually this gets weird. All are valid solidity. Would recommend bytes as default contract A {
function foo() public {
bytes1 a = hex"";
bytes2 b = hex"";
bytes3 c = hex"";
bytes4 d = hex"";
bytes memory e = hex"";
}
} |
It is because we are trying to do type inference from a literal to a specified target type as defined by where the variable is being piped into (we have to do this basically), but it gets tricky for function calls because we have to deduce what function we are actually calling (i.e. disambiguate the function). Should be trivial for Thats why for things where its a simple assignment a la |
If we have parse errors on invalid solidity thats okay. and realistically we should be able to detect this and stop parsing |
This has implications when using low level calls and trying to hit fallbacks or receives
Notice that member access is looking for
call(bytes1)
anddelegatecall(bytes1)
The text was updated successfully, but these errors were encountered: