-
Notifications
You must be signed in to change notification settings - Fork 77
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
Consider changes to bytes
types
#178
Comments
bytes
types
Mathieu and I were talking about this and we think it could make sense to disallow |
Good to note that there would be no way to runtime enforce constructor parameter types, because at "construction" time, no script gets executed because of the way P2SH works. |
We should fix the length of bytes types when using split:
bytes2 firstTwoBytes = test.split(2)[0];
The above does not work, when it should always be possible to type the length of the first element of the tuple. It should only be possible to type the length of the second element when the length of the original bytes element is typed.
The typing when getting both elements of the tuple is also wrong:
firstHalf can only be bytes2 here, and secondHalf can also only be bytes2, because the original length of the bytes element is typed
The text was updated successfully, but these errors were encountered: