tact-lang / tact-docs

Tact main documentation
https://docs.tact-lang.org
57 stars 40 forks source link

book/maps has incorrect map type #352

Closed a-bahdanau closed 2 months ago

a-bahdanau commented 3 months ago

https://github.com/tact-lang/tact-docs/blob/d6ec58ee3180b50f2f89293019e3c7985d6603da/pages/book/maps.mdx?plain=1#L83

Invalid types provided. Map is <Int, Int>, but type String? was provided to variable. Moreover, the page does not mention String is a valid map value type.

Also, in on the same page:

arr: map<Int, Int>; // "array" of String values as a map
a-bahdanau commented 3 months ago

@anton-trunov hey, you have just edited my description and added Moreover, the page does not mention String is a valid map value type.. Seem like tact does not support String as map type yet. Or i am mistaken?

anton-trunov commented 3 months ago

@a-bahdanau Right, String is not supported, although the typechecker does not always report it: https://github.com/tact-lang/tact/issues/701