Open byakuren-hijiri opened 1 week ago
The following snippet cannot be compiled:
// only this test case was found by the fuzzer struct A { a: Bool; } contract Test { s: A = A {a: false}; }
"<unknown>:13:14: Expected constant value, got A
And also, emptyMap() does not work:
emptyMap()
// found after manual code inspection contract Test { m: map<Int, Int> = emptyMap(); }
Slices don't work as well.
// found after manual code inspection contract Test { sl: Slice = beginCell().endCell().asSlice(); }
Note that if all the above initializing expressions move to init() and use assignment, everything works.
init()
Related: https://github.com/tact-lang/tact/issues/284
The following snippet cannot be compiled:
And also,
emptyMap()
does not work:Slices don't work as well.
Note that if all the above initializing expressions move to
init()
and use assignment, everything works.Related: https://github.com/tact-lang/tact/issues/284