tact-docs icon indicating copy to clipboard operation
tact-docs copied to clipboard

book/maps has incorrect map type

Open a-bahdanau opened this issue 1 year ago • 2 comments

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 avatar Aug 16 '24 08:08 a-bahdanau

@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?

a-bahdanau avatar Aug 16 '24 10:08 a-bahdanau

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

anton-trunov avatar Aug 16 '24 10:08 anton-trunov