tact-lang / tact

Tact compiler main repository
https://tact-lang.org
MIT License
345 stars 95 forks source link

Maps should allow storing more primitive types without wrapping them in structs #110

Open anton-trunov opened 8 months ago

anton-trunov commented 8 months ago

For instance, map<Int, Bool> is not directly supported and instead, the user can either emulate booleans with integers and use map<Int, Int> or wrap a boolean into a struct like so:

struct BoolValue {
    value: Bool;
}

boolArray: map<Int, BoolValue>;

(the example above is due to @hitasp: https://t.me/tactlang/11016)

anton-trunov commented 6 months ago

We should also allow strings and coins as map value type (these are allowed when wrapped in a structure anyways).

Gusarich commented 5 months ago

actually Bool is already supported. but Slice, String, and Builder are not, so I'll work on their support.