-
-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat[lang]: allow downcasting of bytestrings (#3832)
this commit extends `convert()` to allow downcasting of Bytes/Strings, i.e. converting `Bytes[20]` to `Bytes[19]`. this improves the UX of bytestrings somewhat, since currently (prior to this commit) there is no type-safe way to decrease the size of a bytestring in vyper. it also prepares us a little bit for adding generic bytestrings inside the type system (`Bytes[...]`) which can only be user-instantiated by `convert`ing to a known length.
- Loading branch information
1 parent
246f4a7
commit 9cfe7b4
Showing
2 changed files
with
76 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters