8000 Destructuring optional struct fields leads to missing function error in FunC · Issue #3122 · tact-lang/tact · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Destructuring optional struct fields leads to missing function error in FunC #3122
Open
@Gusarich

Description

@Gusarich

Destructuring optional struct fields generates invalid FunC code, resulting in a compilation error:

Tact snippet triggering the issue:

struct Inner {
    x: Int;
}

message Outer {
    inner: Inner?;
}

contract Test {
    receive(msg: Outer) {
        let Outer { inner } = msg;
        dump(inner!!.x);
    }
}

Compiler error:

Function '$inner' does not exist in imported FunC sources

Cause:
The Tact compiler incorrectly generates FunC code when destructuring optional struct fields, causing references to non-existent accessor functions.

Expected:
The compiler should handle optional struct destructuring correctly and emit valid FunC code.


LLM Fuzzing discovery (see #3123)

Metadata

Metadata

Assignees

No one assigned

    Labels

    activity: llm-fuzzingIssues found using LLM fuzzingkind: bugSomething isn't working or isn't rightkind: crashInternal compiler error or crash, but no miscompilationscope: typecheckerImplementation of typechecker (src/types)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0