0.19.1
What's Changed
🏕 Features
- Feat/allow empty lists by @nielstron in #305
- Add support for dictionary comprehensions by @nielstron in #309
- Allow eq comparisons between AnyType, AnyType and RecordTypes by @nielstron in #311
- Implement list index by @nielstron in #324
- Allow empty dictionaries to be instantiated with proper type annotation by @nielstron in #323
- Make unary operations dynamic and implement more thereof by @nielstron in #325
- Fix/merging functions with type capturing by @nielstron in #328
🐛 Bug fixes
There was a bug in the type system that would match union type in function parameters in the wrong direction. I.e. if a function expects Union[A, B], the type system would accept a parameter of type Union[A, B, C] but not of type Union[A]. This has now been fixed.
Moreover there was a bug regarding the creation of functions in branches and merging their type definitions which would allow incorrectly typed bound variables inside the functions. I.e. both functions foo in an if/else branch bind the variable x also defined in the same branch. However one x is defined as A and one as B. Hence one foo function would expect A and one would expect B, whereas the type after merging was Union[A, B] and would allow assigning an incorrect value to x.
Finally a bug regarding the re-assignment of polymorphic functions was fixed. If a function decided to re-assign polymorphic functions such as print, the invocation of this function would fail during runtime.
All of the above bugs can only lead to funds being locked in Smart Contracts (due to the contract failing) and not invalid release of funds.
👒 Dependencies
- Bump pytest from 7.4.4 to 8.0.0 by @dependabot in #319
- Bump hypothesis from 6.92.2 to 6.97.4 by @dependabot in #327
Full Changelog: 0.19.0...0.19.1