import "@stdlib/deploy";
contract Example with Deployable {
c: map<Address, Int as coins>;
}
It produces a following compilation error:
Tact compilation failed
Error: /TactPlayground/contracts/playground.tact:4:5: Unsupported format coins for map value
Line 4, col 5:
3 | contract Example with Deployable {
> 4 | c: map<Address, Int as coins>;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
at throwError (/TactPlayground/node_modules/@tact-lang/compiler/dist/grammar/ast.js:66:15)
at resolveABIType (/TactPlayground/node_modules/@tact-lang/compiler/dist/types/resolveABITypeRef.js:223:42)
at buildFieldDescription (/TactPlayground/node_modules/@tact-lang/compiler/dist/types/resolveDescriptors.js:267:61)
at resolveDescriptors (/TactPlayground/node_modules/@tact-lang/compiler/dist/types/resolveDescriptors.js:299:38)
at precompile (/TactPlayground/node_modules/@tact-lang/compiler/dist/pipeline/precompile.js:18:55)
Note, that the same map declared via let inside a function body compiles and works fine.
Expected: normal compilation.
Observed: failure of compilation.
Found by: @howardpen9
Consider the following:
It produces a following compilation error:
Note, that the same map declared via
let
inside a function body compiles and works fine.Expected: normal compilation. Observed: failure of compilation. Found by: @howardpen9