8000 `StringBuilder` Cannot Be Used in Structs or Contract Fields — Not Documented · Issue #2692 · tact-lang/tact · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
StringBuilder Cannot Be Used in Structs or Contract Fields — Not Documented #2692
Open
@Gusarich

Description

@Gusarich

The compiler rejects any attempt to use StringBuilder as a field in a struct or contract, even though this restriction is not documented anywhere.


Reproducible Examples

struct S {
    x: StringBuilder;
}
Error: test.tact:2:5: Unsupported type StringBuilder
  1 | struct S {
> 2 |     x: StringBuilder;
          ^~~~~~~~~~~~~~~~
contract C {
    x: StringBuilder;
}
Error: test.tact:2:5: Unsupported type StringBuilder
  1 | contract C {
> 2 |     x: StringBuilder;
          ^~~~~~~~~~~~~~~~

Problem

  • StringBuilder is listed as a primitive type in the Tact documentation.
  • There is no mention that it cannot be used in structs or persistent state.
  • Other types work without issue.

Expected Behavior

  • If StringBuilder is not supported in persistent storage or structs, this should be clearly stated in the documentation.
  • If it is meant to be supported, this is a compiler bug.

Conclusion

This is a documentation mismatch. The compiler rejects StringBuilder in valid-looking contexts without warning or mention in the docs. Either support should be added, or the limitation must be explicitly documented.


LLM Fuzzing discovery (see #2490)

Metadata

Metadata

Assignees

Labels

activity: llm-fuzzingIssues found using LLM fuzzingkind: bugSomething isn't working or isn't rightkind: docsDocumentation for docs.tact-lang.org kept in docs folder

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0